Sorry yes I meant 2.3.

This has been out in the code base since the GB code was released, so there
will be who knows what devices that ship with it.

The problem is *not* that services are not being restarted, just that their
onStartCommand() is not called with null at that time.  The onCreate()
method is still called.  As a work-around, you could probably just post a
message in onCreate() and set a flag in onStartCommand(); if you haven't
received an onStartCommand() by the time the message is processed, then you
probably aren't going to get the null Intent call.  (If you need to do this
at all...  generally for things like registering receivers, you really
really want to do this in onCreate(), since that method is only called
once.)

On Mon, Feb 28, 2011 at 6:50 PM, rich friedel <[email protected]>wrote:

> On Monday, February 28, 2011 9:38:13 PM UTC-5, TreKing wrote:
>
>> On Mon, Feb 28, 2011 at 8:35 PM, Dianne Hackborn <[email protected]>wrote:
>>
>>> Okay, this did indeed break in *3*.3.
>>
>>
>> Can we assume you meant *2*.3?
>>
>
> Furthermore, can I assume that the START_STICKY behavior won't ever work as
> intended in 2.3? If this is the case what would be the recommended course of
> action to make sure a service stays running or is restarted after the system
> kills it? Again I ask because of the HTC issue...
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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