Package net.openid.appauth.browser
Class CustomTabManager
- java.lang.Object
-
- net.openid.appauth.browser.CustomTabManager
-
public class CustomTabManager extends Object
Hides the details of establishing connections and sessions with custom tabs, to make testing easier.
-
-
Constructor Summary
Constructors Constructor Description CustomTabManager(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(String browserPackage)CustomTabsSessioncreateSession(CustomTabsCallback callbacks, Uri... possibleUris)Creates acustom tab sessionfor use with a custom tab intent, with optional callbacks and optional list of URIs that may be requested.CustomTabsIntent.BuildercreateTabBuilder(Uri... possibleUris)Creates acustom tab builder, with an optional list of optional URIs that may be requested.voiddispose()CustomTabsClientgetClient()Retrieve the custom tab client used to communicate with the custom tab supporting browser, if available.
-
-
-
Constructor Detail
-
CustomTabManager
public CustomTabManager(@NonNull Context context)
-
-
Method Detail
-
createTabBuilder
@WorkerThread @NonNull public CustomTabsIntent.Builder createTabBuilder(@Nullable Uri... possibleUris)
Creates acustom tab builder, with an optional list of optional URIs that may be requested.The URI list should be ordered such that the most likely URI to be requested is first. If the selected browser does not support custom tabs, then the URI list has no effect.
-
dispose
public void dispose()
-
createSession
@WorkerThread @Nullable public CustomTabsSession createSession(@Nullable CustomTabsCallback callbacks, @Nullable Uri... possibleUris)
Creates acustom tab sessionfor use with a custom tab intent, with optional callbacks and optional list of URIs that may be requested.The URI list should be ordered such that the most likely URI to be requested is first. If no custom tab supporting browser is available, this will return null.
-
getClient
@WorkerThread public CustomTabsClient getClient()
Retrieve the custom tab client used to communicate with the custom tab supporting browser, if available.
-
-