android - How to prevent user locking screen while application is still running? -


first of all, know , tested, android os basicly pauses activity when user clicks home button, , resumes activity when user comes back. when user locks screen, destroys activity , recreates when user unlock.

why?! there reasonable explanation attitude?

my problem attitude of android os, need prevent user locking screen while application still running. because have splash screen lets user in after getting data user, , finishes itself. on second activity, release user's info ondestroy. if user locks screen on second activity, system calls ondestroy , release user's info.

how can prevent happen?

i'm not sure can prevent screen locking, check if screen locked in ondestroy (something this or this). if is, save data in saveinstancestate bundle , retrieve in oncreate...

hope helps


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -