Android Code Snippet Prevent Phone From Sleeping

Troberg

Well-Known Member
Licensed User
Longtime User

This works for my Galaxy Note, my Galaxy S, my Galaxy Tab 2 and my GF's Galaxy S5. However, it does not work on my Galaxy Tab S. After a while, it goes to sleep, under exactly the same circumstances as the others.

Any ideas?
 

Troberg

Well-Known Member
Licensed User
Longtime User
I have to withdraw some of my previous comment. It doesn't work on any device for me. Darn annoying with a videoplayer that goes to sleep every 20 minutes...

Am I stupid and missing something obvious here?
 

xpectmore

Member
Licensed User
Longtime User
I am so sorry i see your message now ... after 3 years but still :
you should compile that and when you run that you should see a quick window that desappear and a red eye icon on the top ,left side.
then if you slide the top of your screen in the top of notifications you should read a text as WakeUp,
thanks JohnD !!!

double that!



ps : i use this in conjunction of using b4A-Bridge

------------------------------------------------
UPDATE for anyone use this in conjunction of using b4A-Bridge :
this version will not go to the home no more ,thanks to JOTHA will run b4A Bridge directly !!!
Prevent Phone From Sleeping&run b4a bridge.zip
 

Attachments

  • Prevent Phone From Sleeping.zip
    114.3 KB · Views: 413
  • Prevent Phone From Sleeping&run b4a bridge.zip
    114.7 KB · Views: 585
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…