Android应用程序的当前活动带来正面的问题 [英] Android application current activity bring to front issue

查看:99
本文介绍了Android应用程序的当前活动带来正面的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,我不认为任何附加code-片段可以帮助一个基本问题。当我们preSS home键而应用程序是在前面我们去主页和应用程序失去它的焦点。

I have a basic questions for which I don't think attaching any code-snippet may help. When we press home button while a app is in front we go to the home page and the app looses its focus.

现在,我的应用程序必须具有在状态栏通知图标。并作为我的应用程序,不存在具有2-3个活动可见(一个在另一个之上对话视图)在某些情况下,所以我真的不知道如何我会继续这样的状态,当我preSS通知图标的可能性在状态栏中。

Now, My application has to have notification icon in the status bar. And As in my application, there is a possibility of having 2-3 activity visible(one above another in dialogue view) in certain situation so I am not really sure as to how could I resume such state when I press notifications icon in the status bar.

但是,当我preSS主页按钮,然后preSS在主屏幕中,我得到预期的一切应用程序图标。

But, when I press home button and then press the application icon in the home screen I get everything as expected.

那么,有没有什么办法,通过它我可以通知栏图标这样做。

So, is there any way, by which I can do the same with notification bar icon.

推荐答案

有2种方式这样做的:

  1. <一个href="http://stackoverflow.com/questions/6575730/notification-to-restore-a-task-rather-than-a-specific-activity">Notification恢复任务,而不是一个具体的活动?

<一个href="http://stackoverflow.com/questions/5502427/resume-application-and-stack-from-notification">Resume应用程序并从通知堆叠

这篇关于Android应用程序的当前活动带来正面的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆