/** * Navigates to an {@link bolts.AppLink} for the given destination using the App Link resolution * strategy specified. * * @param context the Context from which the navigation should be performed. * @param destination the destination URL for the App Link. * @param resolver the resolver to use for fetching App Link metadata. * @return the {@link bolts.AppLinkNavigation.NavigationResult} performed by navigating. */ public static Task<NavigationResult> navigateInBackground(final Context context, Uri destination, AppLinkResolver resolver) { return resolver.getAppLinkFromUrlInBackground(destination) .onSuccess(new Continuation<AppLink, NavigationResult>() { @Override public NavigationResult then(Task<AppLink> task) throws Exception { return navigate(context, task.getResult()); } }, Task.UI_THREAD_EXECUTOR); }