Troubleshoot Android SDK

Gradle dependency conflict errors in installation

The HyperTrack SDK includes following dependencies:

Name Version Description
Google Play Services libraries 10.2.0 This includes play-services-gcm, play-services-location, play-services-maps and play-services-places libraries
Firebase Messaging library 10.2.0 For FCM support
Android v7 support 25.3.1 For PlaceSelector widget: this includesrecyclerview-v7 and cardview-v7 libraries.
Android Volley library 1.0.0 For HTTP networking
Eclipse Paho and MQTT library 1.1.1 For MQTT networking
Gson library 2.7 For data serialization and deserialization
smart-scheduler 0.0.11 For job scheduling

The latest version of these libraries will be automatically included as transitive dependencies. To exclude transitive dependencies to resolve version conflicts, you can exclude them by specifying transitive = false and including all the above mentioned dependencies separately. Once you have, clear your Gradle cache and sync your project.

Use different versions of these Gradle dependencies

By default the HyperTrack SDK includes the above mentioned libraries with their versions as specified. In case a different version of one of these library is a dependency to your app or to another library you have integrated, you can follow the following step to resolve this conflict. You will have to remove the required dependecy from the HyperTrack SDK by using exclude command and manually add these dependencies separately. Once you have, clear your Gradle cache and sync your project.

repositories {
    maven {
      url "http://hypertrack-android-sdk.s3-website-us-west-2.amazonaws.com/"
    }
}

dependencies {
    ...

    /**
     * Add com.google.firebase and com.google.android.gms dependencies of the
     * version that you have included or want to include.
     */
    compile 'com.google.firebase:firebase-messaging:11.6.0'
    compile 'com.google.android.gms:play-services-gcm:11.6.0'
    compile 'com.google.android.gms:play-services-location:11.6.0'
    compile 'com.google.android.gms:play-services-maps:11.6.0'
    compile 'com.google.android.gms:play-services-places:11.6.0'

    ...

    /**
     * Exclude com.google.firebase and com.google.android.gms dependencies
     * from HyperTrack SDK dependency for versions other than what is being
     * used by the HyperTrack SDK.
     */
    compile("com.hypertrack:android:0.4.26:release@aar") {
        transitive = true;
        exclude group: 'com.google.firebase', module: 'firebase-messaging'
        exclude group: 'com.google.android.gms', module: 'play-services'
    }

    ...
}

Persistent SDK notification

Why is this required?

  • By default, HyperTrack runs as a service in the background to collect data. However, background services can be killed and restarted by the OS. The OS may do this when it needs to allocate memory to other tasks (for example, to display a large page in the browser) or to conserve battery. The OS will then restart the HyperTrack service automatically when resources are available again.

  • This killing and restarting by the OS often results in patches with missing data. To get higher fidelity tracking with HyperTrack, it is recommended that you use HyperTrack as a foreground service. This is also the default option.

  • Android O is coming up with restrictions on background updates which will also need for HyperTrack SDKs to run as a foreground service for location limits.

  • You can customize this notification by following our customize guide.

Disabling persistent notification

If your app is a consumer app and you want the location tracking to happen silently, then you may want to disable the notification. It can be done by calling HyperTrack.disablePersistentNotification(true). You need to call this only once on a device. This setting is purged only if the app is deleted. By default, persistent notification is enabled when the sdk is integrated. Note that location tracking will be still useful though less reliable if the notification is disabled.

results matching ""

    No results matching ""