DiscoveryUtils

Utility for handling URL and data operations in the prepurchase discovery flow.

Properties

Link copied to clipboard

The default URL for the discovery home page.

Link copied to clipboard

The current domain for the discovery flow.

Link copied to clipboard

The URL for the discovery home page.

Link copied to clipboard

Indicates whether a country switch is in progress.

Link copied to clipboard

UriMatcher for identifying supported URIs.

Link copied to clipboard

Key for passing a URL as an extra in an Intent.

Functions

Link copied to clipboard

Populates the supported URL matcher with a list of supported URLs.

Link copied to clipboard
fun doesSupportPath(destinationUrl: URL, supportedRegexPath: String): Boolean
fun doesSupportPath(urlPath: String, supportedRegexPath: String): Boolean

Checks if a URL path matches a supported regex pattern.

Link copied to clipboard

Checks if a URI contains a supported path.

Link copied to clipboard
fun encode(latitude: Double, longitude: Double, precision: Int): String

Encodes latitude and longitude into a geohash string.

Link copied to clipboard

Parses a JSON string into an ArrayMap.

Link copied to clipboard

Extracts the event ID from a URL.

Link copied to clipboard

Creates a JavaScript method string for a favorite action.

Link copied to clipboard

Creates a JavaScript method string for a denied location permission.

Link copied to clipboard
fun getLocationJsString(latitude: Double, longitude: Double): String

Creates a JavaScript method string for updating location.

Link copied to clipboard

Checks if a URI contains a supported path.

Link copied to clipboard
fun getMemberJsFunctionString(email: String, firstName: String, lastName: String, memberId: String, hmacId: String, accessToken: String, deviceId: String, countryCode: String): String

Creates a JavaScript method string for updating user sign-in status.

Link copied to clipboard
fun getMemberMap(email: String, firstName: String, lastName: String, memberId: String, hmacId: String, accessToken: String, deviceId: String, countryCode: String): Map<String, String>

Creates a map of user member information.

Link copied to clipboard
fun getMemberValuesString(memberInfo: MemberInfo): String

Creates a string of member information from MemberInfo.

Link copied to clipboard

Checks if a URI is the discovery home path.

Link copied to clipboard

Checks if a URL represents an event page.

Link copied to clipboard

Checks if a URL is the discovery home page.

Link copied to clipboard

Checks if a URL is not the discovery home page.