Hi guys, I have a really annoying problem with Android notifications in case of Google Cloud Messaging. I searched many forums and tutorial pages but never got the "correct" answer or hint how to do this correctly.
Scenario: - My app communicates with a php script file on a webserver. - This server can notify my app via the Google-API that news are available online. - For this, a Broadcast Receiver is implemented in my app. - The notification via Google does reach my mobile device. - In case of my app being minimized, a Android notification is created, so that the user gets the icon and the statusbar. - When the user clicks on the notification, the app should be resumed and (as perfect solution) should switch to a specific activity. - Actual behavior: The typical "the App has crashed" message appears. When I close it, my app is resumed at the point where it was minimized. If I debug, I recognize that a second instance of my app is created where the required variables are not set and therefore it crashes. Nevertheless, my old instance is still present and resumed afterwards... How can I fix this? What is the correct code to create a notification in a Broadcast Receiver (I am still confused with the context/intent/pending intent things)? I hope you can help me Greetz -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/656b8112-0afa-4e4c-a290-1e4f8205096a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

