7.0.4

7.0.3

Android SDK iOS SDK
10.0.3 10.0.4

7.0.2

7.0.1

Android SDK
10.0.1

7.0.0

Android SDK iOS SDK
10.0.0 10.0.0

6.2.1

6.2.0

Android SDK iOS SDK
9.2.0 9.2.0

6.1.0

Android SDK iOS SDK
9.1.0 9.1.0

6.0.2

Android SDK iOS SDK
9.0.3 9.0.3

6.0.0

Android SDK iOS SDK
9.0.0 9.0.0

5.3.2

Android SDK
8.3.1

5.3.1

5.3.0

Android SDK iOS SDK
8.3.0 8.3.2

5.2.0

Android SDK iOS SDK
8.2.0 8.2.0

5.1.0

5.0.2

5.0.1

5.0.0

Android SDK iOS SDK
8.0.0 8.0.0

Android Change

4.2.1

4.2.0

Android SDK iOS SDK
7.2.1 7.2.1
export enum ZendriveVehicleTaggingErrorCode {
  // ... other error codes
  INVALID_ZENDRIVE_VEHICLE_BEACON = 'invalid-zendrive-vehicle-beacon',
  BEACON_NOT_ASSOCIATED = 'beacon-not-associated',
  ASSOCIATED_VEHICLE_BEACON_CONFLICT = 'associated-vehicle-beacon-conflict',
  MULTIPLE_UUID_ASSOCIATION_ERROR = 'multiple-uuid-association-error',
  BLE_SCAN_NOT_SUPPORTED = 'ble-scan-not-supported',
  BEACON_SCAN_ALREADY_IN_PROGRESS = 'beacon-scan-already-in-progress',
  BLUETOOTH_NOT_AVAILABLE = 'bluetooth-not-available',
  BLE_SCAN_INTERNAL_ERROR = 'ble-scan-internal-error',
  LOCATION_ERROR = 'location-error'
}
const vehicleId = 'some_vehicle_id';
const uuid = '123';
const minor = 1;
const major = 1;

// get all nearby beacons for a uuid
await Zendrive.getNearbyBeacons(uuid);

// get nearby beacons with range
await Zendrive.getNearbyBeaconsWithRange(uuid, major, minor);

// associate beacon
await Zendrive.associateBeacon({
  vehicleId: vehicleId,
  beacon: {
    uuid: '123',
    major: 1,
    minor: 1,
  },
});

// dissociate beacon
await Zendrive.dissociateBeacon(vehicleId);

// get all associated beacons
const associatedBeacons = await Zendrive.getAssociatedBeacons();
associatedBeacons.forEach((item) => {
  // see type `ZendriveVehicleBeacon` for more details
  // {vehicleId: <string>, beacon: { uuid: <string>, major: <number>, minor: <number> }}
  console.log(`uuid: ${item.vehicleId}`);
  console.log(`beacon: ${item.beacon}`);
});

// isTaggedByBluetooth return a boolean when the trip is tagged by bluetooth
const isTaggedByBluetooth = Zendrive.isTaggedByBluetooth(driveInfo);
console.log(isTaggedByBluetooth); // true or false

// isTaggedByBeacon return a boolean when the trip is tagged by beacon
const isTaggedByBeacon = Zendrive.isTaggedByBeacon(driveInfo); // true or false

Android Changes

Steps to build HMS variant

buildTypes {
    // ... other build types
    hmsRelease {
        initWith release
        applicationIdSuffix '.hms'
        matchingFallbacks = ['debug', 'release']
    }
}
if (getGradle().getStartParameter().getTaskRequests().toString().contains("HmsRelease")) {
    rootProject.ext.rnzendrive = [
        useHmsVariant: true
    ]
} else {
    rootProject.ext.rnzendrive = [
        useHmsVariant: false
    ]
}

iOS Changes

export type DriveInfo = {
  // ... other properties
  extrapolationDetails?: ZendriveExtrapolationDetails,
};

4.1.0

Android SDK iOS SDK
7.1.0 7.1.0
const devices = await Zendrive.getBluetoothPairedDevices();
devices.forEach((item) => {
  // see type `ZendriveBluetoothDevice` for more details
  // {name: <string>, address: <string>}
  console.log(`Name: ${item.name}`);
  console.log(`Address: ${item.address}`);
});

Android Changes

const resp = await Zendrive.setup({
  // other properties
  enabledBluetoothTripStart: true,
});

iOS Changes

// list beacons
const devices = await Zendrive.getAllRegisteredBeacons();
devices.forEach((item) => {
  // see type `ZendriveBeaconDevice` for more details
  // { uuid: <string>, major: <number>, minor: <number> }
  console.log(`uuid: ${item.uuid}`);
  console.log(`major: ${item.major}`);
  console.log(`minor: ${item.minor}`);
});

// add beacon
await Zendrive.addBeacon({
  uuid: '123',
  major: 2,
  minor: 1,
});

// remove beacon
await Zendrive.removeBeacon({
  uuid: '123',
  major: 2,
  minor: 1,
});

Breaking Change

4.0.0

Android SDK iOS SDK
7.0.0 7.0.1
const resp = await Zendrive.setup({
  driverId: 'your-driver-id',
  sdkKey: 'your-sdk-key',
  attributes: {
    vehicleType: 'car', // or 'motorcycle'
  },
});

iOS changes

func settingsChanged(_ settings: ZendriveSettings) {
    send(name: "com.zendrive.onSettingsChanged", body: settings.toErrorsFoundRNObject())
}

3.0.0

Android SDK iOS SDK
6.3.1 6.3.0
Zendrive.setup({
  driverId: 'your-driver-id',
  sdkKey: 'your-sdk-key',
  implementsMultipleAccidentCallbacks: true, // default is false
});

Android changes

iOS changes

2.0.0

Android SDK iOS SDK
6.2.0 6.1.0
Zendrive.setup({
  driverId: 'your-driver-id',
  sdkKey: 'your-sdk-key',
  region: 'US', // or ZendriveRegion.EU
});

Android Changes

Zendrive.setup({
  driverId: 'your-driver-id',
  sdkKey: 'your-sdk-key',
  driveDetectionMode: 'auto-on',
  notificationSettings: {
    channelKey: 'Driving',
    inDriveSettings: {
      contentTitle: 'ZD in-drive',
      contentText: 'Driving has started.',
      smallIcon: require('../img/baseline_drive_eta_black_18.png'),
      notificationId: '<id>',
    },
    mayBeInDriveSettings: {
      contentTitle: 'ZD maybe-in-drive',
      contentText: 'May be in drive.',
      smallIcon: require('../img/baseline_drive_eta_black_18.png'),
    },
    waitingForDriveSettings: {
      contentTitle: 'ZD waiting-for-drive',
      contentText: 'Waiting for drive to start.',
      smallIcon: require('../img/baseline_drive_eta_black_18.png'),
      notificationId: '<id>',
    },
  },
});

iOS changes