Tuesday, June 26, 2012

[android-developers] startForeground icon not showing on Galaxy Nexus

Seeing a weird issue on my Galaxy Nexus with official 4.0.4

I have a service that uses startForeground to keep the process in memory, and, as required by the API, supplies a notification with an icon.

Occasionally (about one every 5-10 calls to startForeground), the service's notification icon disappears after a few seconds.

After this happens, the service is visible in "adb dumpsys activity service", is marked as foreground, and has a notification object.

But the status bar icon won't show.

  * ServiceRecord{42471db0 org.kman.AquaMail/.core.KeepAliveService}
    intent={cmp=org.kman.AquaMail/.core.KeepAliveService}
    packageName=org.kman.AquaMail
    processName=org.kman.AquaMail
    baseDir=/data/app/org.kman.AquaMail-1.apk
    dataDir=/data/data/org.kman.AquaMail
    app=ProcessRecord{41b085b0 30590:org.kman.AquaMail/10065}
    isForeground=true foregroundId=268435457 foregroundNoti=Notification(contentView=org.kman.AquaMail/0x1090098 vibrate=null,sound=null,defaults=0x0,flags=0x62)
    createTime=-44s849ms lastActivity=-37s300ms
    executingStart=-37s300ms restartTime=-44s850ms
    startRequested=true stopIfKilled=false callStart=true lastStartId=5

Subsequent calls to startForeground from the same service, same notification id, bring the icon back.

Tried playing with notification id (using a small value), changing the icon, supplying a ticker or no ticker, using Notification.Builder from API 11 -- no effect.

I am unable to reproduce the issue on an HTC Incredible S with 2.3.

Has anyone else seen this?

-- K

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate