Hi, A li'l update since the last post, the problem regarding the SecurityException is now resolved(i had to put intent-filters in the manifest where the Service was defined) but now another problem regarding the interface has risen. The interface (AIDL) for communication between the activity and the service is defined in another package in another application. How can i now access this SAME interface for communicating with the service from my new application? Any pointers? I searched through the forum and found this thread http://groups.google.com/group/android-developers/browse_thread/thread/71ebbb00d6e2b67c/814f65ba19b5e33e?lnk=gst&q=unable+to+bind+to+a+service#814f65ba19b5e33e
Here Mark has given some examples, but am not very clear as to how the same interface will be used "across" applications. The examples above have the client in another package and the service in the other but both packages in the SAME application. I also understand having access to the service across applications the way i want poses a huge security risk but we intend to build a very robust design to counter those security threats. Thanks, Prafull. On Apr 20, 11:34 am, madmax <[email protected]> wrote: > Hi, > I have been trying out the same things that you mentioned in your > post. I've created aservicefrom an application and on the > "onDestroy()" of that application i'm "unbinding" theservice. Now > when i want to "bind" to the sameservicefrom another application, i > get a SecurityException. The actual error log is as below. > > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): Caused by: > java.lang.SecurityException: Not allowed to bind toserviceIntent > { cmp=aexp.dualservice/.DualService } > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > android.app.ApplicationContext.bindService(ApplicationContext.java: > 807) > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > android.content.ContextWrapper.bindService(ContextWrapper.java:337) > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > com.vignet.serviceDemo1.ConnectToService.initService(ConnectToService.java: > 48) > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > com.vignet.serviceDemo1.ConnectToService.onCreate(ConnectToService.java: > 35) > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: > 1047) > 04-20 11:38:40.231: ERROR/AndroidRuntime(228): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > 2459) > > Is it because while defining myservicei have given the package name > of that application and now when i'm trying to "bind" to theservice > from another app. its giving me a SecurityException that i'maccessing > something from another package altogether? > > Thanks, > Prafull. > > On Apr 19, 9:12 pm, Mark Murphy <[email protected]> wrote: > > > > > > > madmax wrote: > > > Hey Folks, > > > I have aservicethat i need to accessacross > > >multipleApplications. Can anyone tell me how this can be done? > > > Create a remoteserviceand expose an interface through AIDL. Here is a > > pair of sampleapplicationsdemonstrating the technique: > > >http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re...... > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Android Development Wiki:http://wiki.andmob.org > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group > > athttp://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

