Right! So by way of consensus is there a technique and/or pattern
that handles the nuances surrounding a one-and-done background task? Seems
like a documented pattern for such a common use case would benefit
developers and app users alike.
On Wed, Sep 28, 2011 at 10:58 AM, Mark Murphy wrote:
>
Actually, the comment in DetachableResultReceiver.java has this to say about
config changes:
/**
* Proxy {@link ResultReceiver} that offers a listener interface that can be
* detached. Useful for when sending callbacks to a {@link Service} where a
* *listening {@link Activity} can be swapped out d
On Wed, Sep 28, 2011 at 11:41 AM, stanlick wrote:
> Wouldn't this suffer the same fate when the activity experienced a
> configuration change?
You probably pass the ResultReceiver to the new instance via
onRetainNonConfigurationInstance(). Make sure the ResultReceiver does
not have an implicit re
Wouldn't this suffer the same fate when the activity experienced a
configuration change?
On Sep 27, 5:00 pm, Streets Of Boston wrote:
> > IntentService dispenses with the
> > configuration changes but leaves you in a lurch when requiring a
> > response.
>
> In addition to Mark's suggestions, you
On Wed, Sep 28, 2011 at 2:36 AM, Nikolay Elenkov
wrote:
> The iosched app seems to be using one:
>
> http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/util/DetachableResultReceiver.java
> http://code.google.com/p/iosched/source/browse/android/src/com/google
On Wed, Sep 28, 2011 at 7:03 AM, Mark Murphy wrote:
> On Tue, Sep 27, 2011 at 6:00 PM, Streets Of Boston
> wrote:
>> In addition to Mark's suggestions, you could assign a ResultReceiver to one
>> of the Intent's extras:
>> Your Activity could implemented this ResultReceiver's onReceiveResult
>> m
On Tue, Sep 27, 2011 at 6:00 PM, Streets Of Boston
wrote:
> In addition to Mark's suggestions, you could assign a ResultReceiver to one
> of the Intent's extras:
> Your Activity could implemented this ResultReceiver's onReceiveResult
> method.
> Your IntentService could just call 'send(resultCode,
> IntentService dispenses with the
> configuration changes but leaves you in a lurch when requiring a
> response.
In addition to Mark's suggestions, you could assign a ResultReceiver to one
of the Intent's extras:
Your Activity could implemented this ResultReceiver's *onReceiveResult *
method.
Y
8 matches
Mail list logo