App always starts fresh from root activity instead of resuming background state (Known Bug)

前端 未结 5 1883
庸人自扰
庸人自扰 2020-11-28 22:00

I am facing exactly the problem mentioned in these links:

http://code.google.com/p/android/issues/detail?id=2373

http://groups.google.com/group/android-devel

5条回答
  •  情歌与酒
    2020-11-28 22:31

    Similar solution for Xamarin.Android:

    if (!IsTaskRoot)
                {
                    string action = this.Intent.Action;
                    if (this.Intent.HasCategory(Intent.CategoryLauncher) && !string.IsNullOrEmpty(this.Intent.Action) && action == Intent.ActionMain)
                    {
                        Finish();
                        return;
                    }
                }
    

提交回复
热议问题