So, I've read the android AIDL documentation and have a general idea
of how RPC works between an Activity and a Service. However, for my
application it seems overboard to implement such features: basically,
I want to pass a Service a nice handler so its thread can pass data to
my Activity. Currently I'm getting around this by using a static
public member (a hack) but I would prefer just passing a Handler
object in the Service's starting Intent. E.g. I can easily pass ints
to my service upon creation:

int x = 0;
Intent svc = new Intent(this, MyService.class);
svc.putExtra("x",x);
startService(svc);

However since a Handler isn't serialize-able , I haven't found a way
to pass it to the service without a simple static member hack. Any
insight? Or, am I just going to have to suck it up and do a formal RPC
to the service?

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