I am developing one application which can be launched from multiple places like e.g. hyperlink in Calendar. I am facing the problem in the below scenario: If application is already launched and running in the background and User clicks the event/hyperlink in Native calendar to start the appliction. My application is launching twice as a new instance. In the running app list I can see the two instances of my application. I have tried both android:launchMode="singleInstance" and "singleInstance" attribute for my Main activity.but still not working. Can anyone suggest me the solution?
My Manifest looks like below:
<application
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name="com.org.ManishApp"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleInstance">
<intent-filter>`enter code here`
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>