-1

I'm working on an android app and I was wanting to have the apps screen timeout be reset when the app reads something with NFC. The only way I can find to do this is with the deprecated field Powermanager.Full_Wake_Lock.

Is there a proper way to reset the screen timeout other than this?

Chris
  • 460
  • 8
  • 16

1 Answers1

0

Use FLAG_KEEP_SCREEN_ON from here:

How to keep android device from sleeping while plugged in

Also this:

Correct method for setKeepScreenOn / FLAG_KEEP_SCREEN_ON

Community
  • 1
  • 1
Arlyn
  • 169
  • 2
  • 9
  • This will keep the screen on constantly right? I only wish to reset the screen timeout the same if the phone was touched. – Chris Dec 09 '14 at 22:05
  • You can always try it in your code. I have yet to use it. My old projects used the Full Wake Lock when I needed this feature. – Arlyn Dec 09 '14 at 22:13