Krunal Shah
Krunal Shah

Reputation: 1436

How to launch my application from link if, it installed in device

<data
  android:ssp="com.faithmusicmissions.cloudapp"
  android:path="/store/apps/details"
  android:host="play.google.com"
  android:scheme="https" />

using this code, i was try to open my application, from the play store link,
https://play.google.com/store/apps/details?id=com.faithmusicmissions.cloudapp

this code worked but the problem is when i click on other application links which contain "play.google.com" it also give the option to open my application

e.g. I have 2 play store application links in my email, from these link one of my application link and other is another application link
1. https://play.google.com/store/apps/details?id=com.faithmusicmissions.cloudapp
2. https://play.google.com/store/apps/details?id=com.tradiesfriend.tradie

when i click on both links, they display same chooser dialog to launch my application

how to use my application link in element for this https://play.google.com/store/apps/details?id=com.faithmusicmissions.cloudapp

Upvotes: 1

Views: 291

Answers (1)

Sheetal Suryan
Sheetal Suryan

Reputation: 495

    Manifest file 

     <activity
                android:name=".SplashScreenActivity"
                android:label="@string/app_name"
                android:screenOrientation="portrait" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" >
                    </category>
                </intent-filter>
                <intent-filter android:label="@string/app_name" >
                    <action android:name="android.intent.action.VIEW" >
                    </action>

                    <data
                        android:host="xxx.com"
                        android:scheme="http" >
                    </data>

                    <category android:name="android.intent.category.DEFAULT" >
                    </category>
                    <category android:name="android.intent.category.BROWSABLE" >
                    </category>
                </intent-filter>
     </activity>

if want to access url 
In activty

try {
    Uri intentUri = getIntent().getData();
    Log.d(TAG, "Request intentUri: "+intentUri);

} catch (Exception e) {
    Log.i(TAG, "Request intentUri: " , e);
} 

Upvotes: 1

Related Questions