-
public class UrlHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceUrlHandler.UrlHandlerResultListenerUrlHandlerResultListener defines the methods that UrlHandler calls when handling acertain click succeeds or fails.
public classUrlHandler.BuilderBuilder provides an API to configure UrlHandler and create it.
-
Method Summary
Modifier and Type Method Description voidhandleUrl(Context context, String url, List<String> trackingUrls, boolean isFromUserAction)Follows any redirects from {@code destinationUrl}and then handles the URL accordingly.booleanhandleResolvedUrl(@NonNull() Context context, @NonNull() String url, @Nullable() List<String> trackingUrlList, boolean isFromUserAction)Performs the actual url handling by verifying that the {@code destinationUrl}is one ofthe configured supported UrlActions and then handling it accordingly.-
-
Method Detail
-
handleUrl
void handleUrl(Context context, String url, List<String> trackingUrls, boolean isFromUserAction)
Follows any redirects from
{@code destinationUrl}and then handles the URL accordingly.- Parameters:
context- The activity context.url- The URL to handle.trackingUrls- Optional tracking URLs to trigger on successisFromUserAction- Whether this handling was triggered from a user interaction.
-
handleResolvedUrl
boolean handleResolvedUrl(@NonNull() Context context, @NonNull() String url, @Nullable() List<String> trackingUrlList, boolean isFromUserAction)
Performs the actual url handling by verifying that the
{@code destinationUrl}is one ofthe configured supported UrlActions and then handling it accordingly.- Parameters:
context- The activity context.url- The URL to handle.trackingUrlList- Optional tracking URLs to trigger on successisFromUserAction- Whether this handling was triggered from a user interaction.
-
-
-
-