Big problem with notification

Put your problem here if it does not fit any of the other categories.

Big problem with notification

Postby aBsOlUt » Wed Jul 01, 2009 7:32 am

Hey all,

I am facing a problem that it seems I cannot find the correct solution.

My app starts with Activity A which is a loading screen that generates a singleton class that is used throughout the whole app.

Then it goes to activity B. A gets finished() so the stack only has Activity B.

At that point Activity B creates and sends a notification based on some data from the web. So far so good. The notification shows nicely.

Here's where the problem starts:

The notification has an EXPLICIT intent to Activity C. If the app is running and the user decides to check his notification then Activity C is displayed. However, if the user does something else, like press HOME and start opening some other apps, the OS kills my process to save memory etc. The notification IS STILL there. Since the intent is EXPLICIT if the user clicks on it after the app has died or killed by the OS, the result is crash since important data that was generated by Activity A is now null!

I have tried to handle this by using an IMPLICIT intent and specifying an intent-filter. However, I am not sure which activity A or B should handle the intent filter. Activity A preloads mandatory data for the app to work. If I handle this intent with activity A the user thinks he just restarted his app.

Remember, Activity C started by the notification cannot "live" without the mandatory data from both Activity A and B is generated.

I really need your help and input on this.

Thank you!
Once Poster
Once Poster
Posts: 1
Joined: Wed Jul 01, 2009 7:25 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests