On Thu, Feb 2, 2012 at 11:56 AM, Bsweet <[email protected]> wrote: > I'm building an Android application that will provide some helpful > services to other android applications. >
What kind of services? > Activities will remotely bind to my service to interact with it. > > Per feedback and requests from developers using my services, I have > been asked to handle some of the UI flow. > > This requires us to handle a case where I need to get input from the > user. > > Since some of the services I give access to use web service calls, the > calls to my service are asynchronous. I use handlers to callback to > applications that have made request to my service. > > So in launching an activity to help handle the UI Flow this I have run > into a problem. > > It appears I need my service to continue running from the point it was > when it prompts the user to choose an action. So if I don't block the > service thread, my handlers have to finish and lose context to the > message. > > I didn't like this approach, so to get around this I tried to launch > an intent with the original message passed to my service in the extras > of an intent. But it doesn't look like it retains the replyTo to > respond to the eventual action chosen by the user. > > Am I doing something fundamentally flawed? Is there an *Android Way* > of doing this? > I don't get how you're mixing the service and UI. A service doesn't really have anything to do with UI, any UI will be done in an Activity, and then that activity will communicate with the service to talk to it..., So what do you mean by handling UI stuff in your service? I'm assuming you're providing a utility service that other apps can bind to and then use for things like decoupled communication with a web client or something like that... kris -- 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

