Android应用程序APK [英] Android Application ApK

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

问题描述

我有一个奇怪的问题涉及到APK那就是当我安装APK有特色导出后,当我在设备上安装它第一次它工作正常,但如果我preSS home键的应用程序被切换到后台当我把它带到前景再次从开始从当前屏幕开始不,但如果我preSS后退按钮结束应用程序并再次开始那么它的行为是完美的,因为我定义的方式,如果我为一个特定的屏幕和$上p $ PSS home键和发送应用程序,以回地面,然后把它带到脱颖而出地显示它从那里我送它回地面的具体活动。

I am having a strange issue related to APK that is when I install the apk after exporting it with signature and when I install it first time on device it it works fine but if I press home key app goes to background and when I bring it to foreground again it starts from the beginning not from the current screen but if i press back button end application and starts again then its behavior is perfect as I defined means if I m on a specific screen and press home button and send App to back ground and then bring it to fore ground it show the specific activity from where I send it to back ground.

没有任何一个有这种奇怪的行为?

Does any one have this strange behavior ?

在每次活动我增加了onResume方法。 任何帮助将非常感激。

In each activity I have added onResume Method. any help will be grateful.

推荐答案

这是一个长期存在的错误,在Android的:-(这种情况发生时,你使用安装程序安装应用程序,或者从一个IDE(如Eclipse或的IntelliJ) 。或通过Web浏览器下载后,当应用程序被这样的启动,当用户返回到主屏幕并重新启动应用程序,Android不去做它应该做的事(即:把现有任务的前景并让用户继续)。相反,Android的推出根系活力的再次到现有的任务。这使得大多数应用了大量的问题。

This is a long-standing bug in Android :-( This happens when you install the application using the installer, or from an IDE (like Eclipse or IntelliJ) or after download via web browser. When the application is launched like this, when the user returns to the HOME screen and launches the app again, Android doesn't do what it is supposed to do (ie: bring the existing task to the foreground and let the user continue). Instead, Android launches the root activity again into the existing task. This causes a ton of problems for most applications.

有没有什么可以做,以正确的行为。有一些方法来检测这一点,那么你就可以做出相应的反应。请参阅以下内容:

There isn't anything you can do to correct the behaviour. There are some ways to detect this and then you can react accordingly. See the following:

Android的问题 - 1

Android的问题 - 2

Android的问题 - 3

<一个href="http://stackoverflow.com/questions/4341600/how-to-$p$pvent-multiple-instances-of-an-activity-when-it-is-launched-with-differ/">How到活动prevent多个实例,当它与不同的意图是推出

这篇关于Android应用程序APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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