Thanks Mark,
I haven't clarify myself in the previous form.
I have two (or more) apks/applications, When the user opens one of my
applications (called APP A), it starts a service,
when the user opens another application (called APP B), it doesn't
start a service but uses the service. But i want to get this behavior
when the
user chooses to open first APP B and then APP A.

How can I use android:process="com.me.global" in the <service> tag, so
when i start the service only the first app will actually start it ?

On May 16, 3:21 am, Mark Murphy <[email protected]> wrote:
> On Sun, May 15, 2011 at 5:15 PM, Mark Cz <[email protected]> wrote:
> > Is it possible for two apks to SHARE one service that runs in one of
> > the apks process or runs in a different process ?
>
> Yes.
>
> > Meaning,
> > I have two apks running in two different processes (the normal way),
> > for simplicity each apk has only one activity.
> > In addition each apk has one <service
> > android:name="com.me.global.Service"/>,
> > can I share this service between the two (or more) apks ?
>
> Yes.
>
> > The apks have a different certificate, different packageName, what
> > should I write in the manifest of each of them to achieve my goal ?
>
> For the purposes of this answer, App A is the one with the service,
> and App B is the one that is using the service from App A. Have App A
> supply an <intent-filter> for the service (e.g., one with a custom
> <action>). Have App B use an Intent matching that filter when it calls
> startService() or bindService().
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
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