I think the problem I was having is a known Android bug where
sometimes a Service onCreate is called but no corresponding
onStartCommand is called.
The net is if a service is killed in a low memory situation and even
though you return START_STICKY in onStartCommand only the onCreate is
called and not the onStartCommand. One suggested workaround is to do
your initialization in onCreate.

http://groups.google.com/group/android-developers/browse_thread/thread/d87fb390c13d141d/52f7154ab49f229?hl=en&q=dianne+hackborn+onstartcommand+bug#



On Apr 26, 9:34 am, Mark Murphy <[email protected]> wrote:
> On Thu, Apr 26, 2012 at 9:29 AM, beachboy <[email protected]> wrote:
> > As you can the onReceive is executing on process 2072 which is the
> > service process just fine until 20:52. At 20:52 new processes are
> > spawned and my Application onCreate is called. My service is not being
> > killed and restarted because I would seen those log messages. Neither
> > is my application starting.
>
> Your process is being shut down (e.g., you stopped your service), and
> something else (e.g., AlarmManager, app widget) is causing your
> process to be restarted every 30 minutes.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in NYC:http://marakana.com/training/android/

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