On Tue, Jul 3, 2012 at 12:46 PM, brandall <[email protected]> wrote: >> Actually, I think that part of the message may be a fluke. There >> appear to be two cases which call the postNotification() where that >> exception is raised, and only one of those is for a startForeground() >> scenario, if I am reading the source properly. > > > To clarify, I don't call startForeground() in any of the cases. The purpose > of the notification is purely visual and not to make the service foreground. > Perhaps you were referring to the Activity that would be started though??
No, I was referring to the error message. While it *says* "Bad notification for startForeground", it appears that this error might be raised even if *nobody* called startForeground(). Hence, I am telling you to not over-emphasize the "Bad notification for startForeground" portion of the error, as it may be a red herring, fluke, or something else fishy. IMHO, the real question is: where is your contentIntent going? Somehow, Android is winding up with a Notification object that has a null contentIntent, and that appears to be unsupported, at least on Android 1.x/2.x. In the cases where you are explicitly supplying a contentIntent, it should no longer be null. Are you doing anything to the Notification object after you call notify()? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- 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

