IMS SDK Product Document
  • Getting Started
    • iOS
      • Requirements
      • Importing the SDK
      • Permissions
      • Initializing the SDK
      • Using the SDK
        • Using Push Notifications
          • Push notification certificate and profile creation guide
    • Android
      • Requirements
      • Import the SDK
      • Permissions
      • Obfuscation
      • Initialize the SDK
      • Using the SDK
        • Trip Detection and Recording
          • Trip Manager Configuration
            • Using TripDetector.AWARENESS
            • Trip Manager Device Support
          • Trip Manager Control
          • Trip Manager Status
        • Bluetooth and Other Devices
    • React Native
      • Requirements
      • Import the SDK
      • Permissions
      • Initialize the SDK
        • Android
        • iOS
      • Using the SDK
        • Trip Manager
        • Device service
    • Flutter
      • Requirements
      • Import the SDK
      • Permissions
      • Initialize the SDK
      • Using the SDK
  • Security
  • App misuse
  • Time Driven Without Phone
  • DriveSync Portal
    • Requirement
    • User
    • Device
    • Driving Alert
    • Push Notification
    • Invitations
    • Subscription
    • Trip
    • Location
    • Driving Summary
    • Discount
    • Scoring
    • Vehicle
    • Leaderboard
    • Rewards
    • Submit consent to EULA
    • Legal documents and FAQ
    • Named Driver
    • Wedge
  • Known Issues
    • iOS
    • Android
      • 1.17.0
      • 1.18.0
      • 1.22.0
  • Releases
    • 1.13.0
      • iOS
      • Android
    • 1.14.0
      • Android
    • 1.15.0
      • iOS
      • Android
    • 1.15.1
    • 1.16.0
      • iOS
      • Android
    • 1.17.0
      • iOS
      • Android
    • 1.18
      • iOS
      • Android
    • 1.18.1
    • 1.19.0
      • iOS
      • Android
    • 1.20.0
      • Android
      • iOS
    • 1.21.0
      • Android
      • iOS
    • 1.22.0
      • Android
      • iOS
    • 1.23.0
      • Android
      • iOS
    • 1.24.0
      • Android
      • iOS
    • 1.24.1
      • iOS
      • Android
  • Migration
    • iOS
      • 1.15.x -> 1.16.0
      • 1.16.0 -> 1.17.0
      • 1.17.0 -> 1.18.0
      • 1.18.0 -> 1.19.0
      • 1.19.0 -> 1.20.0
      • 1.20.0 -> 1.21.0
      • 1.21.0 -> 1.22.0
      • 1.22.0 -> 1.23.0
      • 1.23.0 -> 1.24.0
      • 1.24.0 -> 1.24.1
    • Android
      • 1.15.x -> 1.16
      • 1.16 -> 1.17
      • 1.17 -> 1.18
      • 1.18 -> 1.19
      • 1.19 -> 1.20
      • 1.20 -> 1.21
      • 1.21 -> 1.22
      • 1.22 -> 1.23
      • 1.23 -> 1.24
  • Support
Powered by GitBook
On this page
  • activateDeviceService
  • deactivateDeviceService
  • fetchDeviceService
  1. Getting Started
  2. React Native
  3. Using the SDK

Device service

activateDeviceService

Description

Activate the current device service for data collection.

Parameters

  • identity (Identity): The identity for activation.

Returns

  • Promise<any>: A promise that resolves when the operation is complete.

Usage example:

import { activateDeviceService, Identity } from "ims-react-native/src";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

activateDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });

deactivateDeviceService

Description

Deactivate the current device for data collection. It may be desirable to deactivate a device if the host application's user logs out or if the user becomes inactive.

Parameters

  • identity (Identity): The identity for deactivation.

Returns

  • Promise<any>: A promise that resolves when the operation is complete.

Usage example:

import { deactivateDeviceService, Identity } from "ims-react-native/src";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

deactivateDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });

fetchDeviceService

Description

Fetch the current Device's model.

Parameters

  • identity (Identity): The identity for fetching the current Device's model.

Returns

  • Promise<any>: A promise that resolves with the current Device's model.

Usage example:

import { fetchDeviceService, Identity } from "ims-react-native";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

fetchDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });
PreviousTrip ManagerNextFlutter

Last updated 1 year ago