More Group Sites
Education Books
School Rankings
Jobless Net
Better Home

Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Sunday, 13 October 2019 2:32:01 PM(UTC)

Rank: Administration


Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 521

Xamarin Forms - How to disable Andoid app restart on push notifications

Address the app reload issue:

Set LaunchMode to SingleTop or Single Task in MainActivity, ie  just add the launch mode to your app's MainActivity.

[Activity(LaunchMode = LaunchMode.SingleTop,...

Add activity flags to an intent object, eg.


var intent = new Intent(this, typeof(MainActivity));

LaunchMode.SingleTop together with ActivityFlags.ClearTop flag:

Clears the Activity stack back to (but NOT including) the target Activity (by finishing all activities in the stack that were on top of the target activity). Calls onNewIntent() on the existing instance of the target Activity, passing the Intent that was used in the startActivity() call.

See Why do people like to pair CLEAR_TOP and SINGLE_TOP in android.


More on Andoid Activity Launch Mode:

Android “launchMode” (Visualized)

Understand Android Activity's launchMode: standard, singleTop, singleTask and singleInstance

The Android Launch Mode Animated CheatSheet

Android Activity Launch Mode

Difference between SingleTask and SingleInstance

App Reload on Push Notification Click Xamarin Forms

Edited by user Sunday, 13 October 2019 2:59:57 PM(UTC)  | Reason: Not specified

Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.