How Keep Android application active on screen timeout

How Keep Android application active on screen timeout
roy_sanuAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Just to clarify: You are asking this question in the context of a user, not a programmer, correct?
0
 
käµfm³d 👽Commented:
You can only do this if the developer of the application has designed the app in this way. Android works differently than normal desktop applications do.
0
 
roy_sanuAuthor Commented:
my concern is when i click a display button it  goes to another screen it runs for 20 sec, instead of staying in that screen it comes back to the original screen.
0
 
roy_sanuAuthor Commented:
yes asking as a programmer

  on the click event of display i have written
10 down vote

I used:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

to disable the screen timeout,  but it is not working
0
All Courses

From novice to tech pro — start learning today.