Package Index - Steerpath Smart SDK

Copyright Steerpath Ltd 2020. All rights reserved.

Getting Started

Overview

SmartSDK is built on top of the CoreSDK. In comparison to CoreSDK, the SmartSDK has following advantages:

  • Simplified API
  • Unified API across each platform
  • Complete User Flows (a.ka UserTasks)
  • SDK Configuration file
  • Simple 'drop-in' map widget

Assets and resources for developers getting started with Steerpath SmartSDK.

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 latest version
    dependencies {
        implementation "com.steerpath:smart:android-smart-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.

SmartSDK.getInstance().start(this, yourAPIKeyHere);

Config.json (Optional)

SDK configuration file contains customer specific configuration such as map’s initial camera position, search categories, routing and positioning parameters. The configuration file needs to be placed in a specific location in the project folder. In Android the configuration file needs to be added to /src/main/assets folder.

POI Data (Optional)

Steerpath provides meta data json separately.

  • pois.json describes POI map objects, such as rooms.
  • buildings.json describes available buildings.
  • geofences.json describes available geofence areas.

These files contains necessary meta data for certain SmartSDK functions. For example, setCametaToObject() requires a String localRef and String buildingRef as parameter:

setCameraToObject("Lounge", "67", 20, null);

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:
<meta-data android:name="SP_OFFLINE_DATA" android:value="theNameOfYourOffineBundle.sff"/>

SDK Logging (Optional)

To enable SDK Logging tool (called "Monitor"), add following flag to your app's Manifest.xml:

<meta-data android:name="SDK_LOGGING_ENABLED" android:value="true" />

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

adb logcat *:S Monitor:V

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.smart Helpers and tools.
com.steerpath.smart.listeners SmartMapFragment interface and callback definitions.