I have an application that starts with a "SplashScreen" and when it finishes it goes to "MainScreen".
I am on "MainScreen" and I click on the home button:
CASE 1. I click on "Overview" (the button that shows the recent apps) and I click on my application and simply continue where it was, ie on MainScreen.
CASE 2. But If I click on app icon from desktop/home screen this launches the application from zero, ie calls SplashScreen.
I want it if I hit the icon from desktop this call the last activity as it does "recent apps.
[Activity(MainLauncher = true, LaunchMode = LaunchMode.SingleInstance,ClearTaskOnLaunch = true, AlwaysRetainTaskState = false, ExcludeFromRecents = true, NoHistory = true, Label = "MyApp", ScreenOrientation = ScreenOrientation.Portrait, Theme = "@style/Theme.FullScreen", Icon = "@drawable/icon")]
I call "MainScreen" like this:
Intent intent = new Intent(Application.Context, typeof(MainActivity)); intent.SetFlags(ActivityFlags.ClearTask); StartActivity(intent); OverridePendingTransition(Resource.Animation.fade_in_animation, Resource.Animation.fade_out_animation); this.Finish(); OverridePendingTransition(Resource.Animation.fade_in_animation, Resource.Animation.fade_out_animation);
[Activity(MainLauncher = false, LaunchMode = LaunchMode.SingleTask, AlwaysRetainTaskState = true, ExcludeFromRecents = false, NoHistory = false, Label = "MyApp", ScreenOrientation = ScreenOrientation.Portrait, Icon = "@drawable/icon", Theme = "@style/Theme.FullScreen")]