Status Update
Comments
vi...@google.com <vi...@google.com>
jb...@google.com <jb...@google.com>
lc...@gmail.com <lc...@gmail.com> #2
So are both app:actions
and app:mimeType
not working when declared in my navigation graph deeplinks? I noticed that in my apk manifest and the manifest merger in android studio, my declared action string was not added to the AndroidManifest.xml at all. Using navigation version 2.4.0-alpha04 btw.
Would the current workaround be declearing all my intentfilters for my deeplink myself and setting my actions there? with a tools:node="merge" or tools:node="replace" ?
lc...@gmail.com <lc...@gmail.com> #3
is there any updates on this issue? i am using Navigation 2.4.0-beta01 and i still do not see the my intent action specified in my navgraph appearing in the merge manifest viewer.
e.g.
<deepLink
android:autoVerify="true"
app:action="android.nfc.action.NDEF_DISCOVERED"
app:uri="https://myapp.app.com/deeplink"
/>
<deepLink
app:action="android.nfc.action.NDEF_DISCOVERED"
app:uri="myapp://myapp.app.com/deeplink"
/>
but in the merged manifest i do not see android.nfc.action.NDEF_DISCOVERED
in the intent filter.I only see action android.intent.action.VIEW
.
cl...@gmail.com <cl...@gmail.com> #4
il...@google.com <il...@google.com> #5
What version of Navigation you use doesn't matter here, since it isn't Navigation that is generating intent filters - this needs to be changed in the Android Gradle Plugin side as that is what it generating these intent filters from your Navigation XML files.
an...@gmail.com <an...@gmail.com> #6
The workaround is to manually add intent filter to manifest.
lc...@gmail.com <lc...@gmail.com> #7
Any updates on this? I am still manually adding intent filters to my manifests for my own actions like ndef etc.
sp...@google.com <sp...@google.com>
mi...@google.com <mi...@google.com>
mi...@google.com <mi...@google.com> #8
Completed work for adding manifest merged support for action and mimeType. It should be available in the next version of AGP.
Description
Navigation recently added support for providing intent actions and mimeTypes to nav deep links.
The manifest merger does not currently have the logic needed to consider these fields when generating the intent filters. That logic should be added.
If the custom action in the navigation xml is not an empty string, its value should replace the default
android.intent.action.VIEW
in the intent filter's<action android:name>
element. If the action is an empty string, the<action android:name>
element should be removed.If the navigation xml is provided with a mimeType, its value should be added to the intent filter in an
<data android:mimeType>
element.Here are some basic examples:
The deep link is given a custom intent action in the navigation xml:
<deepLink app:action=”android.intent.action.MY_ACTION”/>
It should be converted to the following intent filter:
The deep link is given a mimeType in the navigation xml:
<deepLink app:mimeType=”image/jpg”/>
It should be converted to the following intent filter:
To see more details and examples, take a look at the design doc .