So I have two apps running in the same process (thus, the same userid)and I want to communicate between Activity A (from App A) and Service B (from App B). The Messenger example works quite fine but I'd like to use the LocalService like communication (as I'll send quite some messages). When I try to implement this, I do get an invalid cast exception (although the class names do match).
This is the cast in my Activity: public void onServiceConnected(ComponentName name, IBinder service) { Log.d("MS", service.getClass().toString()); main.this.t = (myBinder) service; // Exception in this line of course } and LogCat output: DEBUG/MS(5464): class com.www.shared.myBinder ERROR/AndroidRuntime(5464): java.lang.ClassCastException: com.www.shared.myBinder Is this simply not possible - even if they run in the same process or am I missing something? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en