Android Question Closed app. No handled error - android.view.WindowManager$BadTokenException: Unable to add window (Solved ?)

netsistemas

Active Member
Licensed User
Longtime User
In my proyect, with this old disvice i have this error:
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@d4495e5 is not valid; is your activity running?

I think find and solved problem.

In a service for update files to a fpt, i execute ToasMessageShow

ToastMessageShow("Falló subida " & FileName & CRLF & LastException.Message ,True)

android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@d4495e5 is not valid; is your activity running?
B4X:
ToastMessageShow("Falló subida " & FileName & CRLF & LastException.Message ,True)

'or
ToastMessageShow("ok subida " & FileName & CRLF & LastException.Message ,True)

this, in any cases show this error. I eliminate this show and solved.

i read this
facebook - Unable to add window -- token android.os.BinderProxy is not valid; is your activity running? - Stack Overflow
and similar messages.
Too in this forum (no show msgbox in service, and a think that toasmessageshow are similar).
if any can confirm or say something about this, thanks.


(This error can not capture with try catch, but are showed in log panel into b4x)
This error only show in Galaxy Tab sm-t555 with Adnroid 7.1.1
Not in Android 9
 
Top