The method “Assign Tracker ID” is used to manually assign the SDK a contact identifier (trackerId) obtained from a source external to the SDK itself. Before applying it, the SDK validates with the server that the given trackerId corresponds to an existing contact in your account, using the Connectif.assignTrackerId function.
How to Use
The tracker assignment uses the trackerId parameter to validate and identify the corresponding contact in Connectif.
As a recommendation, this method should only be used when receiving a trackerId from a source external to the SDK session itself.
It is not recommended to use this method if the SDK has already identified a known contact.
• Tracker Info:
| Parameter | Description | Required | Considerations |
|---|---|---|---|
| trackerId | The contact identifier to assign | Yes | Must correspond to an existing contact in Connectif. If the trackerId sent does not exist, it cannot be assigned. |
Example
The tracker assignment will look like this.
Connectif.assignTrackerId("60f1b3b3b3b3b3b3b3b3b3b3")
Callbacks (Optional)
If you want feedback on possible errors when sending events, you can add an EventCallbacks when using our method.
object : EventCallbacks {
override fun onSuccess() {
//Handle success case
}
override fun onError(message: String?) {
//Handle error case
}
}
Keep learning!
To take full advantage of your Connectif account’s potential, we recommend continuing with the following articles:
- Complete Guide to Integrate Connectif with Your Mobile App, to thoroughly understand all changes in this integration.
- Android Get Started, to add Connectif Mobile SDK to your Android project.
- Firebase Cloud Messaging Configuration, to enable sending and receiving push notifications via the Android Mobile SDK.
- Apple Push Notifications Service Configuration, to enable sending and receiving push notifications via the iOS Mobile SDK.