13

I need only one instance of my app in android. If I run my app after installation and go to Home screen, and again run my app (click on app's icon), second instance is opened, I need to open already running first instance not to run second instance. I don't know how to solve this.

Palejandro
  • 1,920
  • 4
  • 23
  • 34

1 Answers1

24

Use android:launchMode="singleTask" or android:launchMode="singleInstance" in your manifest.xml in your activity tag

Vishwajit Palankar
  • 2,941
  • 3
  • 27
  • 46
Vyacheslav Shylkin
  • 9,641
  • 5
  • 37
  • 34