Basic integration

Once the module has been installed and you have configured your publishable token, you can use the methods of the SDK.

In case you are not using Xamarin, you can refer to the Android version, or the iOS version.

Step 1: Define a user

To be able to identify the device, the SDK needs a user id. You can create a new user user on the SDK, and specify the following parameters. This is a network call that requires the device to be online.

[info] User already created?

You can set an existing user id, in case you have created an user id via the backend API using the Hypertrack.SetUserId("YOUR_USER_ID") method in the SDK.


HyperTrack.GetOrCreateUser("USER_NAME", "USER_PHONE_NUMBER", "USER_PHOTO_URL", (HyperTrackUser arg1, HyperTrackError arg2) =>  {

    if(arg2 != null){
    // Handle getOrCreateUser API failure here
      return;

    }

    if(arg1 != null){
        // Handle getOrCreateUser API success here
        System.Console.WriteLine("user created");
    }
);

Step 2: Start tracking

Once the user id has been defined, the SDK can start tracking. Use the StartTracking method to enable the SDK for tracking. You can use the callback methods to confirm tracking is working.

HyperTrack.StartTracking()

Step 3: View dashboard

Install your app with the HyperTrack SDK on a device and begin tracking on the Dashboard. You would see the user’s current state on the HyperTrack dashboard. If you click on the user, you should be able to view the user's trips and stops.

Step 4: Stop tracking

When you want to disable the SDK and stop tracking, call the StopTracking method. You can confirm the SDK is inactive by checking the callback methods.

HyperTrack.StopTracking()

results matching ""

    No results matching ""