FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY没有从历史的意图设置 [英] FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY isn't set for intents from history

查看:1077
本文介绍了FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY没有从历史的意图设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的活动:

<activity
    android:name=".MainActivity"
    android:screenOrientation="landscape"
    android:launchMode="singleTask" 
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />

我用 onNewIntent 来处理新的意图。我并不需要从历史和beggining我已经把这个code工艺意图

I use onNewIntent to handle new intents. I don't need to process intents from history and in the beggining I've put this code

  if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
    return;
  }

不过,这标志了历史的意图没有被设置在的Kindle Fire 。在其他Android设备此code工作良好。也许还有其他方法来避免处理历史的意图?

However this flag is not set for the history intents on Kindle Fire. On other android devices this code works good. Maybe there are any other ways to avoid handling history intents?

推荐答案

的Kindle不支持所有的Andr​​oid操作,请检查的 https://developer.amazon.com/sdk/fire/intents-supported.html

Kindle dont support all android operations, check at https://developer.amazon.com/sdk/fire/intents-supported.html

这篇关于FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY没有从历史的意图设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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