如何重新打开一堆Activity?
我的应用程序由“Main.java”(活动)启动,并打开一个通知和一个名为“Sub.java”的第二个活动,现在我按下主页按钮,应用程序消失(直到这里一切正常)。
如果我现在单击“Main.java”活动已启动的通知,则“Sub.java”似乎丢失了。 是否有可能将活动堆栈重新排序到前面?
非常感谢您的任何答复。
我的问题的示例可以在这里找到: 整个 Eclipse 项目:http://files.foxylion.de/android/problems/sample1。邮编
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谷歌搜索了很长时间后解决了这个问题;)
添加
到通知意图将防止任务总是重新启动。
我在从非活动上下文调用的日志 startActivity 中找到了解决方案的提示;强制 Intent.FLAG_ACTIVITY_NEW_TASK 为:Intent ...,在谷歌搜索后解决方案位于此网站上:http://www.mail-archive.com/[电子邮件&n bsp;受保护]/msg19285.html
Solved the problem after googling for a long time ;)
Adding
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/[email protected]/msg19285.html