In Android M, Google has really improved mobile user experience by changing the way apps are linked to each other. Now when a user will click on a web link, he/she will not have to choose the prompt to reach their content. Suppose when we click on app installation link from anywhere on the web or inside any app. In the current system, we are asked to choose from Play Store, Chrome, or any other browser. We all know we can install app only from Play Store, so why our Android system keeps on asking every time? Don’t you think it should get intelligent enough to understand natural user experience. Now with Android M, this problem will be resolved and we will have a better mobile experience.
How Android understands which App claims support for web link?
In Android M release, Google has provided more powerful app linking capability by enhancing Android intent system. How can you convince Android system that your app owns the link user has clicked on? Developers can now add 'autoVerify' attribute to their application manifest to indicate that they claim support for links user has clicked on. Then Android platform will then request to web servers pointed to by the links at app installation time and look for a file containing the name and signature of the app. This will finally enable Android to verify that the app owns the links it claims it does.
Here is an example of Twitter to make it more clear to developers. First example shows how 'autoVerify' attribute can be used in Twitter App manifest file to claim support for links. Now Android platform will make a request to 'Twitter server' and look for file containing name and signature of app. In second example, we can see how Twitter server has specified app name and signature. This enables Android system to verify that Twitter App supports links they claim.
<data android:scheme=”http” android:host=”twitter.com”/>
sha256_cert_fingerprints:[“SHA256 fingerprint of signing cert”]
Now when a user clicks on a web link verified by Android followed by process will discussed, it will open that in the app which claims to own the link. But you must ensure that App must be installed on user’s device.
Suppose we click on a Twitter link while surfing any website, it will open that in Twitter App because it claims the support for that link. Same will be the case with YouTube video or any other app which can verify its claim with Android system.
By putting App linking capability directly in the platform for developers, Android M will definitely improve core user experience for users. You may also like reading how Custom Chrome Tabs helps in improving mobile web experience in Android M.