Avatar of roy_sanu
roy_sanu
Flag for India asked on

How Keep Android application active on screen timeout

How Keep Android application active on screen timeout
Android

Avatar of undefined
Last Comment
roy_sanu

8/22/2022 - Mon
kaufmed

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.
roy_sanu

ASKER
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.
ASKER CERTIFIED SOLUTION
kaufmed

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
roy_sanu

ASKER
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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy