FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY isn't set

2020-03-18 01:35发布

问题:

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:

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