my App is Launched by "Main.java" (Activity) and opens a Notification and a second Activity called "Sub.java", now I press the Home-Button and the App disapears (everything okay until here).
If I'll now click on the Notification the "Main.java"-Activity is launched, the "Sub.java" seems to be lost. Is there any 开发者_如何学运维posibility to reorder the Stack of Activities to the front?
Thanks a lot for any answer.
Example of my Problem is found here: entire eclipse project: http://files.foxylion.de/android/problems/sample1.zip
Solved the problem after googling for a long time ;)
Adding
notificationIntent.setAction("android.intent.action.MAIN");
notificationIntent.addCategory("android.intent.category.LAUNCHER");
to the notification-intent will prevent the task from beeing always restarted.
The hint to the solution i found in the logs startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent ..., after googling the solution was on this site: http://www.mail-archive.com/android-developers@googlegroups.com/msg19285.html
精彩评论