Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wake Lock Not Working in Android

 
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: 1287
143
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!