Hi, has anyone used `ShortcutInfo.Builder` with na...
# android
j
Hi, has anyone used
ShortcutInfo.Builder
with navigation components? It needs an intent, there is no pendingIntent method that I can pass to the Builder, so cant really use
NavDeepLinkBuilder.createPendingIntent().
s
You could try using
NavDeepLinkBuilder.createTaskStackBuilder()
, you can then use
getIntents()
to get the array of intents, if it's a single activity with fragments you can just use the first intent from that array I guess.
j
Yep, tried that, doesnt work.
s
What was the issue with that?
i
Yep, can't use Intents with extras (at least with the non-simple ones included by NavDeepLinkBuilder) with shortcuts
The support for actions on deep links added in this last release go really well with shortcuts (since shortcuts require an action): https://developer.android.com/jetpack/androidx/releases/navigation#2.3.0-alpha06
👍 2
j
Awesome, thank you for the help!
@Ian Lake is there a sample for this?
i
Not that I know of
👍 1