FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY isn't set

2020-03-18 01:16发布

In my activity:

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

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;
  }

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?

1条回答
看我几分像从前
2楼-- · 2020-03-18 01:45

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

查看更多
登录 后发表回答