Package-level declarations

Types

Link copied to clipboard
class DeepLink

Represents a link into the app.

Link copied to clipboard
interface DeepLinkHandler

DeepLinkHandler can be used to implement Uri based deep links.

Link copied to clipboard
class LaunchInfo(val routes: List<BaseRoute>?, val uri: ERROR CLASS: Symbol not found for Uri??)

Represents information on how the app was launched in the form of either a list of routes or a uri. This information can then be used for deep linking.

Functions

Link copied to clipboard
fun Intent.asLaunchInfo(destinations: ImmutableSet<NavDestination<*>>): LaunchInfo

Turn this Intent into a LaunchInfo instance that can be used with handleDeepLink.

Link copied to clipboard
fun DeepLink.buildIntent(context: Context, destinations: ImmutableSet<NavDestination<*>>): Intent

Creates an Intent that can be used to launch this deep link.

Link copied to clipboard
fun DeepLink.buildPendingIntent(context: Context, destinations: ImmutableSet<NavDestination<*>>, flags: Int = defaultFlag()): PendingIntent

Creates a PendingIntent that can be used to launch this deep link.

Link copied to clipboard
fun DeepLink.buildTaskStack(context: Context, destinations: ImmutableSet<NavDestination<*>>): TaskStackBuilder

Creates a TaskStackBuilder that can be used to launch this deep link.

Link copied to clipboard
fun Set<DeepLinkHandler>.createDeepLinkIfMatching(uri: ERROR CLASS: Symbol not found for Uri, defaultPrefixes: Set<DeepLinkHandler.Prefix>): DeepLink?

Checks if the given uri matches one of the DeepLinkHandler in the Set and if yes creates a DeepLink. Otherwise null is returned.

Link copied to clipboard
fun DeepLink(routes: List<NavRoute>, action: String? = null): DeepLink

A deep link created with this will open the app with the given routes added to the back stack on top of the start destination. The last of the given routes will be the visible screen.

fun DeepLink(root: NavRoot, routes: List<NavRoute> = emptyList(), action: String? = null): DeepLink

A deep link created with this will open the app and create a back stack with root on top of the start destination. The given routes will be added to that back stack. The last of the given routes will be the visible screen, if none is provided root will be visible.

Link copied to clipboard
fun HostNavigator.handleDeepLink(launchInfo: LaunchInfo, deepLinkHandlers: ImmutableSet<DeepLinkHandler>, deepLinkPrefixes: ImmutableSet<DeepLinkHandler.Prefix>): Boolean

If the given launchInfo can be handled using deepLinkHandlers and deepLinkPrefixes then the navigator will clear the current back stack and navigate to the required destinations.

fun HostNavigator.handleDeepLink(intent: Intent, destinations: ImmutableSet<NavDestination<*>>, deepLinkHandlers: ImmutableSet<DeepLinkHandler>, deepLinkPrefixes: ImmutableSet<DeepLinkHandler.Prefix>): Boolean

If the given Intent was created from a DeepLink or the Uri returned by Intent.getData can be handled using deepLinkHandlers and deepLinkPrefixes then the navigator will clear the current back stack and navigate to the required destinations.

Link copied to clipboard