Yes it is not a compatible device if it is ignoring startForeground().
 Which device is doing this?  This would be really bad, since things like a
music app (including the standard Android music app) relies on this to be
able to play music without interruption.

The workaround I would suggest is the one I gave before, posting a message.

Generally a notification shouldn't be to say "the app is running."  That
isn't something we tell the user, it just junks up the status bar.
 Notifications are for things like having new e-mail, download active or
complete, music playing, etc.

The closest a notification should be tied to the act of an app running is
through the use of startForeground(), though even the documentation there
tries to be clear that you aren't doing this just to be running, but because
you are doing something the user is actively interested in and that is what
the notification (and foreground state) is about.

On Tue, Mar 1, 2011 at 9:58 PM, rich friedel <rich.frie...@gmail.com> wrote:

> That is similar to how I was using the onStartCommand() method.
>
> I check for a null intent and then if it's not null check to see if there
> is a specific intent extra passed. If that extra is passed then I know the
> user explicitly started the service and not the system. This is an issue for
> me because when the system kills my service and restarts it, the onDestroy()
> method is never called and the status bar icon and notification are never
> removed. This makes the user think that the application is still running
> (which it should but at that time I was not using START_STICKY) when it
> actually was not.
>
> I looked into using startForeground() but saw there is a major issue with
> HTC devices ignoring that method, so that was a no go for me.
> As a quick aside... does anyone know why it is that HTC seemingly ignores
> that method? It seems to me like they purposely do so. That seems wrong to
> me because I believe that the device manufactures should not be allowed to
> mess with the very basic functionality of the Android OS. If it was
> something that was not part of the official SDK or OS (read:
> ContentProvider) then fine I get that, but basic functionality should always
> be supported IMO.
>
> Anyway, that is why I was asking Ms. Hackborn how it specifically works...
> because if onStartCommand() ever has an instance that it might not be called
> then I was going to have to figure out how to work around that.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to