FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY isn't set for intents from history

人走茶凉 提交于 2019-12-09 03:11:17

问题


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



来源:https://stackoverflow.com/questions/8733634/flag-activity-launched-from-history-isnt-set-for-intents-from-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!