android - Toast from FileObserver -


i have problem. i'm using fileobserver, moves new files watched directories another, former specified directory. in thoughts there should shown toast message says 'file xy has been moved', long observer watches directory, if applications in background. didn't working. tells me, there runtimeexception, , cannot been done without calling looper.prepare().

05-11 13:21:28.484: warn/system.err(3397): java.lang.runtimeexception: can't create handler inside thread has not called looper.prepare()

i tried way using handler too, didn't work.

has else idea? in advance.

best regards, tobi

obviously, fileobserver runs(or is) thread. can not modify ui non-ui thread. pass handler fileobserver , send messages it. read handlers.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -