** Set manifest 1 **
<intent-filter android:label="test" >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="test"
android:scheme="example" />
</intent-filter>
** Get data from Intent 2 **
val action: String? = intent?.action
val data: Uri? = intent?.data
if(data!= null) {
val dataString = data.toString()
if(dataString.equals("example://test")){
intent = Intent (this, DeepActivity::class.java)
startActivity(intent)
}
}
** Launch the app from the a tag (deep link) 3 ** Load the html page from the browser of the terminal and tap the link to start the application
<a href="example://test"> example://test</a>
Recommended Posts