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
Copy file name to clipboardExpand all lines: README.md
+56-3Lines changed: 56 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Kotlin SDK for integrating with optable-sandbox from an Android application.
7
7
-[Installing](#installing)
8
8
-[Using](#using)
9
9
-[Identify API](#identify-api)
10
+
-[Profile API](#profile-api)
10
11
-[Targeting API](#targeting-api)
11
12
-[Witness API](#witness-api)
12
13
-[Integrating GAM360](#integrating-gam360)
@@ -170,6 +171,58 @@ Since the `sendGoogleAdIDBoolean` value provided to `identify()` is `true`, the
170
171
171
172
The frequency of invocation of `identify` is up to you, however for optimal identity resolution we recommended to call the `identify()` method on your SDK instance every time you authenticate a user, as well as periodically, such as for example once every 15 to 60 minutes while the application is being actively used and an internet connection is available.
172
173
174
+
### Profile API
175
+
176
+
To associate key value traits with the user's device, for eventual audience assembly, you can call the profile API as follows:
177
+
178
+
#### Kotlin
179
+
180
+
```kotlin
181
+
importco.optable.android_sdk.OptableSDK
182
+
importmy.org.app.MainActivity
183
+
importandroid.util.Log
184
+
...
185
+
MainActivity.OPTABLE!!
186
+
.profile(hashMapOf("gender" to "F", "age" to 38, "hasAccount" to true))
if (result.getStatus() ==OptableSDK.Status.SUCCESS) {
215
+
Log.i(null, "Profile API Success... ");
216
+
} else {
217
+
// result.getStatus() is OptableSDK.Status.ERROR
218
+
// result.getMessage() is the error message
219
+
Log.e(null, "Profile API Error: "+ result.getMessage());
220
+
}
221
+
});
222
+
```
223
+
224
+
The specified traits are associated with the user's device and can be used for matching during audience assembly. The traits are of type `OptableProfileTraits` which is an alias for `HashMap<String,Any>` (or `HashMap<String,Object>` in Java), and should consist only of key-value pairs where the key is a string and the value is either a string, number, or boolean.
225
+
173
226
### Targeting API
174
227
175
228
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:
The specified event type and properties are associated with the logged event and which can be used for matching during audience assembly. The optional witness event properties are of type `OptableWitnessProperties` which is an alias for `HashMap<String,String>`, and should consist only of string key-value pairs.
371
+
The specified event type and properties are associated with the logged event and which can be used for matching during audience assembly. The optional witness event properties are of type `OptableWitnessProperties` which is an alias for `HashMap<String,Any>` (or `HashMap<String,Object>` in Java), and should consist only of key-value pairs where the key is a string and the value is either a string, number, or boolean.
319
372
320
373
### Integrating GAM360
321
374
@@ -432,7 +485,7 @@ override fun onCreate(savedInstanceState: Bundle?) {
0 commit comments