Package Index - Steerpath SDK

Copyright Steerpath Ltd 2020. All rights reserved.

Getting Started

Assets and resources for developers getting started with Steerpath CoreSDK android-core-3.10.x

Mapbox

Steerpath CoreSDK is derived from Mapbox 8.4.0: https://docs.mapbox.com/android/maps/overview/

Installation

Permissions

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>     

Dependencies (app.gradle)

    // for backwards compatibility
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    repositories {
        maven { url "https://android-sdk.steerpath.net" }
    }
    // see changelog for the latest version
    dependencies {
        implementation "com.steerpath:steerpath:android-core-x.x.x"
    }

Other configuration:

  • Make sure your project's minSdkVersion is at API 21 or higher.

API Key

Contact support@steerpath.com

How To Start The SDK

Recommended place to start the SDK is your Application.java class.

First, create SdkConfig object:

private static SdkConfig createConfig(Context context) {
    return SdkConfig.fromDefault(context)
            .apiKey("yourAPIKeyhere")
            .build();
}

Then, use singleton instance to start:

SteerpathClient.getInstance().start(this, sdkConfig, new SdkStartCallback() {

    public void onStarted() {

    }

    public void onError(SdkLoadException e) {

    }
});

Offline Data (Optional)

OfflineBundle (.sff) is a package containing indoor map tiles, (world tiles excluded), map style, routing data, positioning data and map object meta data. With OfflineBundle, maps & indoor positioning works without network connection.

Steps to enable OfflineBundle

  1. Copy provided .sff file into your application project's /assets folder
  2. Add following flag to your app's Manifest.xml:
SdkConfig.fromDefault(context).installOfflineBundle(theNameOfYourOfflineBundle.sff);

SDK Logging (Optional)

To enable SDK Logging tool (called "Monitor"), use:

SdkConfig.fromDefault(context).developerOptions(DeveloperOptions.getDefaultOptions());

When enabled, an additional overlay button will appear on the map. To filter logs in terminal, use:

adb logcat *:S Monitor:V

Theming

Overridable resources:

Documentation for old SDK

Troubleshoot

Requirements for indoor positioning to work

  • Nearby Steerpath beacons
  • Application needs permissions
  • Bluetooth must be turned on
  • Location Services must be turned on
  • Real device is required. Bluetooth does not work with the emulator.

Map data on the server has changed, when can I see the changes in my app?

SDK automatically checks updates and downloads files silently in the background. Updates are applied next time app is launched.

Background BLE scan, OS limitations and Doze

Device manufactures may implement custom Power Saving modes or customize Android Doze. While improving battery life, these customizations may also terminate the indoor positioning when app is in the background.

For best indoor positioning experience, check background limitations in your device Settings. Be sure app is allowed to run in the background. Typically these settings can be found in Settings > Apps > Battery

For example with Huawei COR-L29, following steps ensures continuous background positioning

  • Be sure app is managed manually in Settings > Battery > App launch
  • Allow Auto-launch and Run in background

Settings may be different with different devices.

Misc

How much the SDK will increase the size of my app?

Around 14MB

Why Location Permission is needed?

This is because Google requires apps requesting access to Bluetooth also obtain location permission too, as Bluetooth can be used to derive location information when combined with beacons in fixed locations.

Bluetooth LE uses the MAC address of the device's Bluetooth/Wifi chipset to identify other devices. Now, the problem is that if a user A has both GPS and Bluetooth enabled and he or she walks nearby some other user B who has only Bluetooth enabled, the location of user B "leaks" through the user A. So, because Bluetooth can be used to identify a device, and the device's location can be discovered indirectly via some other device, Google enforces this policy so user would understand that his or hers location can be now discovered.

Learn more: https://developer.android.com/guide/topics/connectivity/bluetooth

GDPR

SDK does not collect personally identifiable information. The default Telemetry tracking id is GUID that is used to identify a specific app instance, not user. GUID is reset after every app reinstall.

Learn more: https://developer.android.com/training/articles/user-data-ids

Support

support@steerpath.com

Packages

com.steerpath.sdk.assettracking This package contains utilities that allows this device to simulate Steerpath Asset Gateway device.
com.steerpath.sdk.common This package contains utilities used by the different functions of Steerpath.
com.steerpath.sdk.directions This is the core package for accessing Steerpath indoor directions.
com.steerpath.sdk.domain.entities Internal models and interfaces.
com.steerpath.sdk.domain.repository Internal models and interfaces.
com.steerpath.sdk.geofence Geofencing, aka area or zone based triggering, for the Steerpath platform.
com.steerpath.sdk.live Steerpath Live is for location sharing and asset tracking.
com.steerpath.sdk.location This is the core package for accessing Steerpath positioning.
com.steerpath.sdk.maps Steerpath maps provides vector based indoor floor plans and outdoor maps.
com.steerpath.sdk.maps.defaults This package contains default map widgets.
com.steerpath.sdk.maps.model Building data model.
com.steerpath.sdk.meta This is the package for accessing Steerpath Web API.
com.steerpath.sdk.search Search map objects.
com.steerpath.sdk.storage Internal storage.
com.steerpath.sdk.telemetry Telemetry Service
com.steerpath.sdk.utils Helpers and tools.