活动历史堆栈在第一个错误安装的设备? [英] Activity history stack wrong upon first install on device?

查看:110
本文介绍了活动历史堆栈在第一个错误安装的设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

修改/更新:

作为更新到下面的问题,我发现这会导致它发生的确切作用。

As an update to the below problem, I found the exact action which causes it to happen.

  1. 通过Android浏览器下​​载从URL的APK
  2. 安装的应用程序。
  3. 在安装后,该应用程序为您提供了两种选择:打开或完成
  4. 如果您选择打开,下面开始介绍的古怪行为。
  5. 如果您选择完成,然后启动从应用程序托盘中的应用程序,它工作正常。

所以好像这个问题是由于使用了打开按钮,浏览器提供您在安装APK之后。

So it seems like this problem is caused by using the "Open" button the browser provides you after installing the APK.


我在第一次安装经历的应用历史堆栈错误。我做了一个测试程序来证明这一点。

I'm experiencing an error in the history stack of applications upon first install. I made a test app to demonstrate this.

测试应用程序是根本就是两个活动,A和B.活动一推出B.这就是它。休息是从日食产生的向导模板code。

The test app is simply two activities, A and B. Activity A launches B. That's all it does. Rest is wizard generated template code from eclipse.

当用户安装该应用程序(通过网络链接APK),并运行它的第一的时候,我得到了序活动堆栈:

When the user installs the app (via web url apk), and runs it for the first time, I get an out-of-order activity stack:

- 用户启动应用程序,A是在上面。
   - 他们通过点击一个按钮,使一个启动B点。 B是在堆栈的顶部。
   - 用户点击主屏幕按钮。
   - 用户返回到应用程序,显示,而不是B.
A,    - 用户点击后退键,B表示!
   - 用户点击后退键一次,A显示!
   - 用户点击再次返回键,显示主屏幕。
   - 现在堆栈是干净的,而应用程序的行为正常从现在开始!

-User starts the app, A is on top.
-They make A launch B by clicking a button. B is on top of the stack.
-User hits the home screen button.
-User returns to the app, A is displayed, instead of B.
-User hits the back key, B is shown!
-User hits the back key again, A is shown!
-User hits the back key again, home screen shown.
-Now the stack is clean, and app behaves "normally" from now on!

是任何其他人看到呢?这几乎完全一样已知的错误,但我的用户不会在Eclipse安装: <一href="http://$c$c.google.com/p/android/issues/detail?id=2373&q=first%20%20i">http://$c$c.google.com/p/android/issues/detail?id=2373&q=first%20%20i...

Is any one else seeing this? This is almost exactly like this known bug, however my users are not installing from eclipse: http://code.google.com/p/android/issues/detail?id=2373&q=first%20%20i...

我可以提供测试程序/源,如果有人想尝试。这是明显的,它没有任何特殊的定制向它提出的。

I can provide the test app/source if anyone wants to try. This is the manifest, which does not have any special customizations made to it.

<activity android:name=".ActivityA"
          android:label="ActivityA"
  >
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
</activity>

<activity android:name="ActivityB"
          android:label="ActivityB"
  >
  <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>

据我所知,这应该肯定不会发生,清除历史堆栈后的第一次工作正常。

as far as I know, this should definitely not be happening, and works fine after you clear the history stack the first time.

感谢

推荐答案

检查我怎么workarounded这一点 - 的http:// github.com/cleverua/android_startup_activity

Check how I workarounded this - http://github.com/cleverua/android_startup_activity

这篇关于活动历史堆栈在第一个错误安装的设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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