1

I am opening my application using scheme url from browser. I have an activity say ActivityA that opens up when user clicks a link on a browser and which then starts another activity say ActivityB and finish itself. Now if i have 4 different links with same scheme, all are opening my app properly. But when i follow the following procedure

  1. Click on the first link, it opens up the ActivityA which then starts ActivityB.
  2. Now the app is running in background. If I click on second link it also opens up ActivityA. Result is same for third and fourth link.
  3. Now if i again click on the first link while app is running in background, it does not open ActivityA, rather it just brings the app to front.

1 Answers1

0

You can set clearTaskOnLaunch="true" in AndroidManifest.xml If you are launching browser from your application than Launch browser in new task (with FLAG_ACTIVITY_NEW_TASK), and finish current activity(to finish current task).

Krutik
  • 732
  • 6
  • 19