- is an intent filter
- associate a URL with the activity you want to open.
- specifies a destination ID.
- uses a PendingIntent.
- PendingIntent is a wrapper of an Intent, which lets another application run the Intent.
- clears the back stack, and pushes the following destinations in sequence:
- the startDestination of the navigation graph
- parent activity destinations
- other startDestination(s) if navigation graphs are nested
- the specified destination (goal)
- is a notification or an app widget, for example.
- specifies a URI.
- A URI without a scheme matches both http and https.
- e.g.
www.example.com/foo
matches bothhttps://www.example.com/foo
andhttp://www.example.com/foo
. .*
matches 0 or more characters.- Placefolders like
http://www.example.com/users/{id}?myarg={myarg}
are available. {id}
can be got asarguments?.getString("id")
, or asarguments?.getInt("id")
if SafeArgs is used as follows.
- e.g.
<fragment>
<deepLink
android:id="@+id/deepLink"
app:uri="example.com/users/{id}" />
<argument
android:name="id"
app:argType="integer" />
</fragment>
- clears the back stack like explicit deep linking if the implicit Intent was launched with the Intent.FLAG_ACTIVITY_NEW_TASK flag.
- does NOT clear the back stack unlike explicit deep linking unless the implicit Intent was launched with the
Intent.FLAG_ACTIVITY_NEW_TASK
flag.<nav-graph>
in<activity>
inAndroidManifest.xml
is required to enable implicit deep linking from outside the app.- At compile time,
<nav-graph>
generates<intent-filter>
elements for all the deep links.
- At compile time,