multithreading - Android : Finding the top of the thread hierarchy in order to keep the screen awake -


i have android app. created processing.

i'm trying stop screen going sleep. , looks though view.setkeepscreenon() i'm looking for.

however, when view of app. , try call it, following error :

android.view.viewrootimpl$calledfromwrongthreadexception: original thread created view hierarchy can touch views. 

how can thread in order put code there?

try wrapping runnable , using activity.runonuithread().


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -