How to avoid multiple open in particular application in android?

149 views Asked by At

I have already opened my android application. I used url scheme, so that my app can be opened from the users email. But if i try to open my application from clicking email link from the web browser, it will open that application in separate window. (Please see my attached screen short picture) .

How to avoid my application to open twice separately?enter image description here

<activity
android:name="com.mYs3.MainActivity.flash_screen"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>            
<intent-filter>
    <data android:scheme="mYs3" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

1

There are 1 answers

2
Maciej Boguta On BEST ANSWER

try this line in your activity block in manifest

android:launchMode="singleTask"