Best: you probably don't need to have the service running in a separate
process from your code, so use the LocalService api demo model, and just do
direct calls to Java objects both ways without dealing with aidl at all.

On Wed, Sep 9, 2009 at 5:39 AM, Mark Murphy <[email protected]> wrote:

>
> sdphil wrote:
> > i understand how to call methods on a service (aidl, etc...), but how
> > does a service event information out.  how does it generate events
> > back to the application?
>
> Option #1: Broadcast an Intent using sendBroadcast()
>
> Option #2: Implement a callback mechanism, where the client creates an
> AIDL interface and sends a corresponding object to the service, which
> uses that object to communicate back to the client
>
> You can see examples of the latter in the RemoteClientEx and
> RemoteServiceEx examples from my Advanced Android book:
>
>
> http://github.com/commonsguy/cw-advandroid/tree/e50e087577f8b28e727355c55097a5da2577d6d3/AdvServices
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Need help for your Android OSS project? http://wiki.andmob.org/hado
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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 [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