You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kotlin SDK for integrating with optable-sandbox from an Android application.
3
+
Kotlin SDK for integrating with an [Optable Data Connectivity Node (DCN)](https://docs.optable.co) from an Android application.
4
4
5
5
## Contents
6
6
@@ -54,7 +54,7 @@ Remember to replace `VERSION_TAG` with the latest or desired [SDK release](https
54
54
55
55
## Using
56
56
57
-
To configure an instance of the SDK integrating with an [Optable](https://optable.co/)sandbox running at hostname `sandbox.customer.com`, from a configured application origin identified by slug `my-app`, you can instantiate the SDK from an Activity or Application `Context`, such as for example the following application `MainActivity`:
57
+
To configure an instance of the SDK integrating with an [Optable](https://optable.co/)DCN running at hostname `dcn.customer.com`, from a configured application origin identified by slug `my-app`, you can instantiate the SDK from an Activity or Application `Context`, such as for example the following application `MainActivity`:
58
58
59
59
#### Kotlin
60
60
@@ -71,7 +71,7 @@ class MainActivity : AppCompatActivity() {
You can then call various SDK APIs on the instance as shown in the examples below. It's also possible to configure multiple instances of `OptableSDK` in order to connect to other (e.g., partner) sandboxes and/or reference other configured application slug IDs.
101
+
You can then call various SDK APIs on the instance as shown in the examples below. It's also possible to configure multiple instances of `OptableSDK` in order to connect to other (e.g., partner) DCNs and/or reference other configured application slug IDs.
102
102
103
-
Note that all SDK communication with Optable sandboxes is done over TLS. The only exception to this is if you instantiate the `OptableSDK` class with a fourth optional boolean parameter, `insecure`, set to `true`. For example, in Kotlin:
103
+
Note that all SDK communication with Optable DCNs is done over TLS. The only exception to this is if you instantiate the `OptableSDK` class with a fourth optional boolean parameter, `insecure`, set to `true`. For example, in Kotlin:
However, since production sandboxes only listen to TLS traffic, the above is really only useful for developers of `optable-sandbox`running the sandbox locally for testing.
109
+
However, since production DCNs only listen to TLS traffic, the above is meant for Optable developers running the DCN locally for testing.
110
110
111
-
By default, the SDK detects the application user agent by sniffing `settings.userAgentString` from a `WebView`. The resulting user agent string is sent to your sandbox for analytics purposes. To disable this behavior, you can provide an optional fifth string parameter `useragent`, which allows you to set whatever user agent string you would like to send instead. For example, in Kotlin:
111
+
By default, the SDK detects the application user agent by sniffing `settings.userAgentString` from a `WebView`. The resulting user agent string is sent to your DCN for analytics purposes. To disable this behavior, you can provide an optional fifth string parameter `useragent`, which allows you to set whatever user agent string you would like to send instead. For example, in Kotlin:
Finally, an optional sixth boolean parameter `skipAdvertisingIdDetection` can be used to skip any ID info detection from `AdvertisingIdClient` which by default runs in a background co-routine. Disabling ad ID detection means that the SDK will not be able to automatically obtain the Google Advertising ID. For example, to disable ad ID detection, in Kotlin:
The SDK `identify()` method will asynchronously connect to the configured sandbox and send IDs for resolution. The second (`sendGoogleAdIDBoolean`) and third (`ppid`) arguments to `identify()` are optional. You can register an observer to understand successful completion or errors.
178
+
The SDK `identify()` method will asynchronously connect to the configured DCN and send IDs for resolution. The second (`sendGoogleAdIDBoolean`) and third (`ppid`) arguments to `identify()` are optional. You can register an observer to understand successful completion or errors.
179
179
180
-
> :warning:**Client-Side Email Hashing**: The SDK will compute the SHA-256 hash of the Email address on the client-side and send the hashed value to the sandbox. The Email address is **not** sent by the device in plain text.
180
+
> :warning:**Client-Side Email Hashing**: The SDK will compute the SHA-256 hash of the Email address on the client-side and send the hashed value to the DCN. The Email address is **not** sent by the device in plain text.
181
181
182
182
Since the `sendGoogleAdIDBoolean` value provided to `identify()` is `true`, the SDK will fetch and send the Google Advertising ID in the call to `identify` too, unless the user has turned on "Limit ad tracking" in their Google device advertising settings.
183
183
@@ -237,7 +237,7 @@ The specified traits are associated with the user's device and can be used for m
237
237
238
238
### Targeting API
239
239
240
-
To get the targeting key values associated by the configured sandbox with the device in real-time, you can call the `targeting` API as follows:
240
+
To get the targeting key values associated by the configured DCN with the device in real-time, you can call the `targeting` API as follows:
241
241
242
242
#### Kotlin
243
243
@@ -334,7 +334,7 @@ Note that both `targetingFromCache()` and `targetingClearCache()` are synchronou
334
334
335
335
### Witness API
336
336
337
-
To send real-time event data from the user's device to the sandbox for eventual audience assembly, you can call the witness API as follows:
337
+
To send real-time event data from the user's device to the DCN for eventual audience assembly, you can call the witness API as follows:
338
338
339
339
#### Kotlin
340
340
@@ -516,9 +516,9 @@ public void onCreate(Bundle savedInstanceState) {
516
516
517
517
## Demo Applications
518
518
519
-
The Kotlin and Java demo applications show a working example of `identify`, `targeting`, and `witness` APIs, as well as an integration with the [Google Ad Manager 360](https://admanager.google.com/home/) ad server, enabling the targeting of ads served by GAM360 to audiences activated in the [Optable](https://optable.co/)sandbox.
519
+
The Kotlin and Java demo applications show a working example of `identify`, `targeting`, and `witness` APIs, as well as an integration with the [Google Ad Manager 360](https://admanager.google.com/home/) ad server, enabling the targeting of ads served by GAM360 to audiences activated in the [Optable](https://optable.co/)DCN.
520
520
521
-
By default, the demo applications will connect to the [Optable](https://optable.co/) demo sandbox at `sandbox.optable.co` and reference application slug `android-sdk-demo`. The demo apps depend on the [GAM Mobile Ads SDK for Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start) and load ads from a GAM360 account operated by [Optable](https://optable.co/).
521
+
By default, the demo applications will connect to the [Optable](https://optable.co/) demo DCN at `sandbox.optable.co` and reference application slug `android-sdk-demo`. The demo apps depend on the [GAM Mobile Ads SDK for Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start) and load ads from a GAM360 account operated by [Optable](https://optable.co/).
0 commit comments