Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wake Lock Not Working in Android  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have following code in my main Activity


When I run this code this is Not Working I mean Screen is Not Countinuosly on Brightness it dims as usual .

and FULL_WAKE_LOCK is also showing depreceated in eclipse.

What are the Other options to put this working WAKE_LOCK

Thanks
 
Ron McLeod
Saloon Keeper
Posts: 1525
210
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look here for information on how to tell the window manager to keep the device's screen turned on and bright for a particular Activity. Also, there is a code example here which might be helpful.
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!