Android app restarts when opened by clicking app icon
Add this to your launcher activity:
if (!isTaskRoot()) {
finish();
return;
}
super.onCreate(savedInstanceState);
I found it. I had set a flag android:launchMode="singleTask"
in my activity flag. I deleted that code.
I also added onsaveInstance
method to all the activities in my code and it's working now!
Thanks :)