Reputation: 164
I have one serious question might you have gone through it. I have seen that when we send the youtube video links to any person then, when someone opens that link, the link is opens the app(youtube app) in case if he/she already installed youtube app on their device or mobile phone.
Now, i have google out such thing to do with our own created application. But, got some massy results. I want to know that What the actual logic or code to apply the Same ?
What the supported thing to do to implement it ?
EDIT :
Done as below :
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<data
android:host="zoomvysame.app.link"
android:scheme="https"/>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
and using link after app installation : https://zoomvysame.app.link
Upvotes: 1
Views: 153
Reputation: 3376
You are asking about AppIndexing(Deep Linking).
App indexing allows a user to click on the link from mobile and navigate the user to the app if the app exists in device else navigate him on play store with app listing.
For doing AppIndexing you need to define acceptable URL scheme in launch activity of your application like:-
<activity... >
<intent-filter>
<data android:host="zoomvysame.app.link" android:scheme="https"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
In above example when you click a link like "https://zoomvysamescreen.app.link" it will launch your application instead of the opening link in the browser.
There is some solution over AppIndexing is provided by branch and Firebase you can get more details and more control over App indexing using their implementation.
Upvotes: 1
Reputation: 6834
It's Deep Linking
From official documentation
To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest. These intent filters allow deep linking to the content in any of your activities.
There are so many deep linking providers like branch.io
Upvotes: 1