[android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Brion Emde
Also, this video from this year's Google IO about using RESTful Services with Android is excellent and may give you some ideas: http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html On Sep 14, 11:08 am, Bret Foreman bret.fore...@gmail.com wrote: I'm stuck on a

[android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Bret Foreman
As far as I can see from the docs, createPendingResult works with onActivityResult, which works with startActivityForResult. In other words, it only works with an Activity, not a Service. It's too bad they don't have startServiceForResult. The broadcast/receive approach looks interesting. It's

Re: [android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Mark Murphy
On Tue, Sep 14, 2010 at 11:50 AM, Bret Foreman bret.fore...@gmail.com wrote: As far as I can see from the docs, createPendingResult works with onActivityResult, which works with startActivityForResult. onActivityResult() yes, startActivityForResult(), no. In other words, it only works with

[android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Bret Foreman
But the Service class has no setResult method. How would it provide the data to onActivityResult? Yes, it works with a service. The client side has to be an activity; the one sending the message can be anything, including a service. It's just amazing how hard this is with Android.

[android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Bret Foreman
Three different patterns described in one hour. Impressive. And a lot of food for thought. It's a pity that Google doesn't just draw a line in the sand and say this is how we want to do it and then provide a bunch of infrastructure to make it simple in 90% of the cases. On Sep 14, 8:50 am, Brion

Re: [android-developers] Re: Marshalling web service data to the UI

2010-09-14 Thread Mark Murphy
On Tue, Sep 14, 2010 at 1:17 PM, Bret Foreman bret.fore...@gmail.com wrote: But the Service class has no setResult method. How would it provide the data to onActivityResult? By using the pending result object, obtained from createPendingResult(), supplied to the Service via an Intent extra, as