Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package co.optable.sdk
/**
* Represents the consent information for GDPR and GPP.
*
* @param gdprSubject A boolean indicating whether GDPR applies, represented as a integer (0 when it does not apply, 1 when it does). This value should be present when gdpr_consent is supplied.
* @param gdprSubject A boolean indicating whether GDPR applies. This value should be present when gdpr_consent is supplied.
* If not set, SDK will try to fetch data from SharedPreferences (key `IABTCF_gdprApplies`), as stated in
* [standard](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details)
* @param gdprConsent TCF EU v2 consent string. If not set, SDK will try to fetch data from SharedPreferences (key `IABTCF_TCString`), as stated in
Expand Down
29 changes: 15 additions & 14 deletions android_sdk/src/main/java/co/optable/sdk/OptableSDK.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import kotlinx.coroutines.*

/**
* OptableSDK provides an API that is used by an Android app developer integrating with an
* Optable Sandbox.
* Optable Data Connectivity Node (DCN).
*
* An instance of OptableSDK refers to an Optable Sandbox specified by the caller via config provided to the constructor.
* The `context` is required in order for the SDK to build a WebView for receiving the user agent and SharedPreferences.
* An instance of OptableSDK refers to an Optable DCN specified by the caller via config provided to the constructor.
* The `context` in the config is used to read the Google Advertising ID, the default user agent, SharedPreferences
* and the app's package information.
*
* It is possible to create multiple instances of OptableSDK, should the developer want to
* integrate with multiple Sandboxes.
* integrate with multiple DCNs.
*/
class OptableSDK(
private val config: OptableConfig,
Expand All @@ -46,7 +47,7 @@ class OptableSDK(
}

/**
* Calls the Optable Sandbox "identify" API, passing it the list of IDs,
* Calls the Optable DCN "identify" API, passing it the list of IDs,
* a list of type-prefixed identifiers.
*/
fun identify(ids: List<OptableIdentifier>, listener: OptableResultListener<Unit>) {
Expand All @@ -71,9 +72,9 @@ class OptableSDK(
}

/**
* tryIdentifyFromURI(uri) is a helper that attempts to find a valid-looking "oeid"
* parameter in the specified uri's query string parameters and, if found, calls
* this.identify(listOf(oeid)).
* tryIdentifyFromUrl(url) is a helper that attempts to find a valid-looking "oeid"
* parameter in the specified url's query string parameters and, if found, calls
* this.identify() with it.
*
* The use for this is when handling incoming app universal/deep links which might
* contain an "oeid" value with the SHA256(downcase(email)) of an incoming user, such
Expand All @@ -91,7 +92,7 @@ class OptableSDK(
}

/**
* Calls the Optable Sandbox "profile" API to associate the
* Calls the Optable DCN "profile" API to associate the
* specified key-value traits, which can be subsequently used for
* audience assembly.
*
Expand Down Expand Up @@ -128,27 +129,27 @@ class OptableSDK(
}

/**
* Calls the Optable Sandbox "targeting" API, which returns the key-value targeting
* Calls the Optable DCN "targeting" API, which returns the key-value targeting
* data matching the user/device/app and part of the OpenRTB code snippet.
* @see OptableTargeting
*
* This type accepts multiple optional identifier values. When EIDs are generated, each supported
* identifier is encoded according to its identifier type (for example, some values are normalized,
* whitespace-stripped, or encrypted). Additional identifiers may be supplied through the `Raw` or `Custom` type.
* whitespace-stripped, or hashed). Additional identifiers may be supplied through the `Raw` or `Custom` type.
*/
fun targeting(ids: List<OptableIdentifier>, listener: OptableResultListener<OptableTargeting>) {
targeting(ids, emptyList(), listener)
}

/**
* Calls the Optable Sandbox "targeting" API, which returns the key-value targeting
* Calls the Optable DCN "targeting" API, which returns the key-value targeting
* data matching the user/device/app and part of the OpenRTB code snippet,
* additionally forwarding [hids] (hint identifiers) for third-party identity resolvers.
* @see OptableTargeting
*
* This type accepts multiple optional identifier values. When EIDs are generated, each supported
* identifier is encoded according to its identifier type (for example, some values are normalized,
* whitespace-stripped, or encrypted). Additional identifiers may be supplied through the `Raw` or `Custom` type.
* whitespace-stripped, or hashed). Additional identifiers may be supplied through the `Raw` or `Custom` type.
*/
fun targeting(
ids: List<OptableIdentifier>,
Expand Down Expand Up @@ -205,7 +206,7 @@ class OptableSDK(
}

/**
* Calls the Optable Sandbox "witness" API to log a
* Calls the Optable DCN "witness" API to log a
* specified 'event' (e.g., "app.screenView", "ui.buttonPressed"), with the specified key-value
* 'properties', which can be subsequently used for audience assembly.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ internal class IdentifiersEncoder(
/**
* Returns a type-prefixed ID based on the query string
* oeid=sha256value parameters in the specified uri, if one is found.
* Otherwise, it returns an empty string.
* Otherwise, it returns null.
*
* The use for this is when handling incoming deep links which might contain an "oeid" value
* with the SHA256(downcase(email)) of a user, such as encoded links in newsletter Emails
Expand Down
Loading