Thank you very much Mark, Joe.
But below call i.e., binding with the Interface name is not working. I
got the same error, "not able to bind, service not found.."
bindService(new Intent(IScript.class.getName()), svcConn,
Context.BIND_AUTO_CREATE);
But, below way of binding works. i.e., Binding with the exported
Service.
Intent i = new Intent();
i.setClassName("com.mt.TestRemoteService",
"com.mt.TestRemoteService.MyService");
bindService(i, svcConn, Context.BIND_AUTO_CREATE);
Why bind with Interface name is not working for me?
( Note: I have added an <intent-filter> on the <service> with a
Interface <action> )
thanks,
Krishna
On Jun 18, 9:28 pm, Joe Onorato <[email protected]> wrote:
> You will also have to include the .aidl as source in your other
> project. The two different apks don't link against each other or
> anything like that. Otherwise, the generated java class won't be
> available.
>
> -joe
>
> On Jun 18, 7:44 am, Mark Murphy <[email protected]> wrote:
>
>
>
> > On Fri, Jun 18, 2010 at 7:37 AM, Krishna Shetty
>
> > <[email protected]> wrote:
> > > I have created a service which exposes few AIDL defined interfaces.
> > > I want to access this Service from an application with different
> > > package.
> > > I have no clue how to achieve this. I want to see an example on this.
>
> > Step #1: Add an <intent-filter> on the <service> with some custom <action>.
>
> > Step #2: Use that action String when constructing the Intent for
> > binding to the service from the client.
>
> >http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re......
>
> > --
> > Mark Murphy
> > CommonsWare
> > [email protected]http://commonsware.com
--
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