I am getting this ClassCaseException -
/ActivityManager(213): Bad activity token: android.os.BinderProxy@420b43f0
W/ActivityManager(213): java.lang.ClassCastException: android.os.BinderProxy cannot be cast to
com.android.server.am.ActivityRecord$TokenW/ActivityManager(213): at
com.android.server.am.ActivityRecord.forToken(ActivityRecord.java:295)
W/ActivityManager(213): at com.android.server.am.ActivityManagerService.configureSoftkeysActivity(ActivityManagerService.java:15095)
W/ActivityManager(213): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:1572)W/ActivityManager(213): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1646)
W/ActivityManager(213): at android.os.Binder.execTransact(Binder.java:338)
W/ActivityManager(213): at dalvik.system.NativeStart.run(Native Method)
Do any one has any idea why I am getting this exception. Thanks in advance.
I know it's old, but thought I'd answer as I've just solved this myself. This (for me) is due to having android:process
in my Service
declaration of the application manifest. Simply removing that solved my issue immediately.
Hope this helps someone!
If service to bind is in different process with the caller, you should use AIDL interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With