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
  • Battery Optimization work arounds
  • Problematic Devices
  • Fixing Runtime Crashes
  • Huawei (No Google Services)
  • Importing repository
  1. Known Issues

Android

PreviousiOSNext1.17.0

Last updated 1 year ago

Battery Optimization work arounds

The Android SDK does as much as it can in ways of permissions, workers, and other methods in order to either keep an app alive or have the ability for the app to wake up. Even with the efforts of our SDK, each Android device manufacture has its own implementation of battery optimization which can override the Android OS's measures. This leads to inconsistent behaviour across Android device manufactures. Please see the website for further information and workarounds.

Problematic Devices

  • Samsung

  • OnePlus

  • Huawei

  • Xiaomi

Fixing Runtime Crashes

Depending on your configuration you may need to add additional dependencies to the app's build file to prevent runtime crashes. The most common ones are:

dependencies {
    ...
    implementation 'androidx.work:work-runtime-ktx:2.7.0' 
    implementation 'dnsjava:dnsjava:3.4.1'
    implementation 'com.google.android.gms:play-services-location:19.0.1'
    implementation 'androidx.datastore:datastore-preferences:1.0.0'
    implementation 'com.squareup.moshi:moshi-kotlin:1.12.0'
    implementation 'no.nordicsemi.android.support.v18:scanner:1.6.0'
    implementation 'com.google.code.gson:gson:2.8.8'
    ...
}

Huawei (No Google Services)

For newer Huawei devices that have been bought in China, some of these devices no longer use the Android OS which means they also do not have Google Play Services. Google Play services is required for the SDK in order to receive GPS data and Activity data. The IMS SDK will not work with these devices.

This does not apply for Huawei devices that have been purchased outside of China.

Importing repository

Because the repository is protected you need to add your credentials to the build.gradle file:

maven {
    url 'https://maven.pkg.github.com/ims-developers/android-sdk'
    name 'GitHubPackages'
    credentials {
        username System.getenv("GITHUB_MAVEN_USERNAME")
        password System.getenv("GITHUB_MAVEN_PAT")
    }
}

Don't kill my app!