android - Difference between Wakelock and Activity Flag_KEEP_SCREEN_ON -


you can keep screen awake in android through 2 ways. have read thread difference between wakelock , flag_keep_screen_on?

mwakelock = mpowermanager.newwakelock(powermanager.screen_bright_wake_lock,              getclass().getname()); 

or adding flag_keep_screen_on activity,

getwindow().addflags(windowmanager.layoutparams.flag_keep_screen_on); 

that answer did not cover points should use one. looking same


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -