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
Post a Comment