Handle existing instance of root activity when launching root activity again from intent filter

Posted by Robert on Stack Overflow See other posts from Stack Overflow or by Robert
Published on 2010-04-03T06:14:45Z Indexed on 2010/04/03 6:23 UTC
Read the original article Hit count: 765

Filed under:
|
|
|

Hi, I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app.

My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity.

steps:

  1. Launch root activity A, press home
  2. Open email attachment, intent filter triggers launches root activity A

Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?

© Stack Overflow or respective owner

Related posts about android

Related posts about activity