android - Is it necessary to call Looper.prepare() from within the UI thread? -


if want implement handler object within activity's main thread, need call looper.prepare() beforehand, or activities have own internal loopers? same hold true if want instantiate handler instance within service?

the main thread has own looper. see context.getmainlooper(). main thread encompasses activities , services in application.


Comments

Popular posts from this blog

c# - error executing child request for server.transfer with Handler -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

How to read input from STDIN in x86_64 assembly? -