Method reference

The React Native wrapper has methods for some commonly used methods in the native SDKs. Methods do not return anything, and use callback functions to return objects and method results.

Example implementation

Initialise with your key

import RNHyperTrack from 'react-native-hypertrack';

export default class MyApp extends Component {
  constructor() {
    // Initialize HyperTrack wrapper


Name Parameters Description
initialize token: string Initialize the SDK and configure the publishable token
getPublishableKey callback: method Get the configured token from the SDK
createUser name: string, successCallback: method, errorCallback: method Create a new user to identify the current device
setUserId userId: string Set an identifier for the SDK by using an existing user id
getUserId callback: method Get the current user id configured in the SDK
startTracking successCallback: method, errorCallback: method Enable the SDK and start tracking
stopTracking successCallback: method, errorCallback: method Disable the SDK and stop tracking
isTracking callback: method Get true if the SDK is enabled and tracking, false otherwise
completeAction actionId: string Complete an action from the SDK

Was this helpful? Yes, thanks! Not really

results matching ""

    No results matching ""