Hi,
    I have been trying out the same things that you mentioned in your
post. I've created a service from an application and on the
"onDestroy()" of that application i'm "unbinding" the service. Now
when i want to "bind" to the same service from 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 to service Intent
{ 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 my service i have given the package name
of that application and now when i'm trying to "bind" to the service
from another app. its giving me a SecurityException that i'm accessing
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...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 at
http://groups.google.com/group/android-developers?hl=en

Reply via email to