Please see me recent reply to another thread.  It sounds like you are
running two instances of your service.  You do NOT declare the service in
the client process, but you DO need to specify the correct component name in
the Intent when binding to it from the client -- that is explicitly make a
ComponentName whose package is that of the actual .apk holding the service.

On Thu, Feb 12, 2009 at 12:58 PM, Hans <hkess...@gmail.com> wrote:

>
> Wow, weirdness...
>
> Starting the remote service, whose code is in another project than the
> client's, via a global name resolved the thread issue.
>
> So, to sum up:
>
> IF you keep your service code in its own project
> If you don't declare a name like this:
>
> <action android:name="com.android.TestService.TEST_SERVICE" />
>
> in your service's manifest you'll be unable to start the service
> without adding a service entry to your client's manifest (<service/>),
> which is a weird way to solve the problem but for some reason results
> in instantiating the process remotely (if designated as being a remote
> process.)
>
> You can bind on this service, you can call methods on this service,
> you can register a callback on this service (that's running in another
> process) BUT you can't receive callbacks from the service's main
> thread, only from its threadpool.
>
> LOL.
>
> Sigh.  One unusual thing down, billions to go.
>
> Thanks for the pointers Dianne :).
>
>     Hans :)
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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

Reply via email to