How to start A application's specific activity in B application by link?
- Share a URI contains information about A's specific activity.
- If a user click that link in B app, start A app's specific activity.
this is my AndroidManifiest.xml
code.
<activity android:name = ".activity.PhotoActivity">
<intent-filter >
<data android:scheme="mine" android:host="photo"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
this is shareURI
method.
fun sendUri(videoId:String?, point:Long) {
val sharedUri = "mine://photo?photo_id=$photoId&size=$size"
val intent = Intent(Intent.ACTION_SEND)
intent.type = "text/plain"
intent.addCategory(Intent.CATEGORY_DEFAULT)
intent.addCategory(Intent.CATEGORY_BROWSABLE)
intent.data = Uri.parse(sharedUri)
startActivity(Intent.createChooser(intent, "Share URL"))
}
But it's not working. when I try to share that link, chooser does not appear. and there's a message.
'All app associated with this action have been disabled, blocked, or are not installed.`