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
  • 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
  • Enable Google Awareness API
  • Add Awareness API to Manifest
  • Add Feature to IMSTripManager
  1. Getting Started
  2. Android
  3. Using the SDK
  4. Trip Detection and Recording
  5. Trip Manager Configuration

Using TripDetector.AWARENESS

PreviousTrip Manager ConfigurationNextTrip Manager Device Support

Last updated 1 year ago

Follow this guide to use the TripDetector.AWARENESS feature

Enable Google Awareness API

  1. Create or use an existing project in

  2. Navigate to "APIs and Services" by either using the search in Google Cloud Services or by using this link:

  3. Select "Enable APIs and Services" then search for and select "Awareness API". ()

  4. Select "Enable" and wait until the process has finished

  5. Now that the API has been enabled, lets get a key to use in the app.

    1. Select the "" tab

    2. Click "Create Credentials" -> "API key". This will generate an unrestricted key.

    3. In the dialog with the key showing, select "Edit API key"

    4. Set the application restriction to "Android Apps"

    5. Under Android Restrictions click "Add"

    6. Follow the instructions on the screen to add your app's fingerprint to the restrictions

Add Awareness API to Manifest

Add the following to your app's manifest and replace "API_KEY" with the key generated using the above instructions

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.awareness.API_KEY"
            android:value="API_KEY"/>
    </application>
</manifest>

Add Feature to IMSTripManager

When adding TripDetectors, include the TripDetector.AWARENESS feature

 .addTripDetectors(TripDetector.AWARENESS, ...)
https://console.cloud.google.com/
https://console.cloud.google.com/apis/dashboard
https://console.cloud.google.com/apis/library/usercontext.googleapis.com
Credentials