Not sure.  First, Services do not have a "parent Activity".  Also not
sure what kind of "results" the Service was building and how you can
detect that this "result building" was going on while the device was
asleep.  Maybe adding some logging with timestamps would be more
reliable.  The main point is that ASFAIK the CPU is not running while
the device is asleep and therefore it is not possible for the Service
to be running...

On Jan 26, 6:04 am, Robert Woodruff <[email protected]> wrote:
> Yes the app registers the BroadcastReceivers dynamically with
> registerReciever
> (). Both the Activity and the Service have  BroadcastReceivers registered.
> In testing it seems like when the Activity is onPause'd the Service keeps
> running, or at least the AsyncTask in the Service continues to run.
>
> For testing the app that starts the service is launched and then the Android
> is set aside so that it goes into the sleep state. Later I wake up the
> Android, with the Menu button, and the Service has been running in the
> background. It was building up a queue of results to sent to the parent
> Activity when the parent onResume'd. That queue has grown larger while the
> Android was asleep.
>
> Does this seem reasonable to your understanding?
>
> On Mon, Jan 25, 2010 at 12:49 PM, jotobjects <[email protected]> wrote:
>
> > On Jan 25, 5:54 am, Robert Woodruff <[email protected]> wrote:
> > > I want the Service to remain active even if/when the Activity that spaned
> > it
> > > goes dormant with onPause(). According to the docs with the bindService
> > call
> > > "…if this Context is an Activity that is stopped, the service will not be
> > > required to continue running until the Activity is resumed."
>
> > But that doesn't imply the reverse - that the service will be required
> > to continue running if it is not bound to any Activity.  In fact a
> > service not bound to any Activity has a low priority for being allowed
> > to continue running. See -
>
> >http://developer.android.com/intl/fr/reference/android/app/Service.ht...
>
> > There is a lot of "best practice" discussion suggesting that
> > applications should avoid designs that require Services to continue
> > running indefinitely.
>
> > If you started the BroadcastReceivers dynamically with registerReciever
> > () it is my understanding that these BroadcastReceivers will not keep
> > running if the Activity or Service where you started them has stopped.
>
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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