I solve the problem with deep linking in the android application, after clicking on the link, the application should open and some action should be performed. As a result, I found a solution - for the activation, the manifest specifies an intent filter with the required domain and prefix, with the result that the activation is registered on the device as capable of handling a click on a link with a specific domain, like this:
<activity android:name=".MyActivity" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"> <intent-filter> <category android:name="android.intent.category.BROWSABLE" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:host="{host}" android:pathPrefix="{path_prefix}" android:scheme="http" /> </intent-filter> </activity> Everything works fine, but I noticed that a new instance of this activity is opening. In this application, deep linking is used for authorization by clicking on a link from a letter. That is, at a certain step, the user minimizes the application, opens the mail, clicks the link, and receives a new activation instance when the previous one exists. In order to be absolutely clean, you must either close the not-killed activit when you click on the link, or open not a new activation instance, but deploy the existing one if it exists. Is there a way to make such a check from the opening activity?