Examples
import SentianceCore from "@sentiance-react-native/core";Create a Sentiance user
Using an Authentication Code (Recommended)
// returns Promise<CreateUserResult>
const createUserResult = await SentianceCore.createUser({authCode});With User Linking
// returns Promise<CreateUserResult>
const createUserResult = await SentianceCore.createUser({
appId,
appSecret,
platformUrl,
linker: async (installId) => {
// request your backend to perform user linking
await linkUser(installId);
// return true to indicate to the SDK that user linking on your
// backend was successful. return false otherwise.
return true;
}
});Without User Linking (Not Recommended)
Link a Sentiance user on the device to a third party ID
Using an Authentication Code (Recommended)
Using a Linker
Enabling detections on the SDK
Disabling detections on the SDK
Init status
SDK status
Get the SDK version
Get the user ID
Check if user exists on device
Check if the current user is linked to a third party ID
Get the user access token
Adding custom metadata
Remove custom metadata
Adding multiple custom metadata fields
Starting trip
Stopping trip
Trip status
Control sending data
Disk, mobile network and Wi-Fi quotas
User Activity
Update the SDK foreground notification (ANDROID ONLY)
Resetting the SDK
Enable/Disable app session data collection
Check app session data collection status
Disable battery optimization (Android)
Control Transmittable Data Types
Last updated