FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY没有从历史的意图设置意图、历史、FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY

2023-09-06 09:47:49 作者:伤感在游骋

在我的活动:

<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

 
精彩推荐
图片推荐