Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Custom URL to open App like in iOS

Tags:

html

android

ios

I can add a link to, for example, 'navigon://' on a website that, in iOS devices, will open up the Navigon app if it is installed.

Is there a similar simple method to open an app from a website (assuming it's installed) in Android?

like image 386
MaFt Avatar asked Feb 21 '11 12:02

MaFt


People also ask

Does Android have universal link?

How do Universal Links work in Android? Android App Links (sometimes referred to as Universal links) are HTTP URLs available on Android 6.0 and higher, that help in bringing your users directly to your Android app. It contains the autoVerify attribute that allows your app to designate itself as a given type of link.


2 Answers

Android deep linking: Add an intent filter to your manifest

<activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos">     <action android:name="android.intent.action.VIEW" />     <category android:name="android.intent.category.DEFAULT" />     <category android:name="android.intent.category.BROWSABLE" />     <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->     <data android:scheme="http"           android:host="www.example.com"           android:pathPrefix="/gizmos" />     <!-- note that the leading "/" is required for pathPrefix-->     <!-- Accepts URIs that begin with "example://gizmos”     <data android:scheme="example"           android:host="gizmos" />     --> </intent-filter> 

https://developer.android.com/training/app-indexing/deep-linking.html

like image 50
DeaMon1 Avatar answered Sep 27 '22 22:09

DeaMon1


Check out intent filters in Android. Check out the Category specially.

like image 36
Aman Alam Avatar answered Sep 27 '22 22:09

Aman Alam