-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Mist provides indoor blue dot navigation experience with 16 vBLE antenna array in Mist Access Point. This guide will provide detailed information on our Android SDK. It will help you configure application to integrate Mist SDK and initialize location services.
- Android Studio: 3.0+ - This document assumes that reader has basic knowledge of Android development.
- Minimum Android SDK: API 21
- Target Android SDK: API 271
- Latest Mist SDK: 2.0
1 If your app is targeting API level 28 (Android 9.0) or above, you must include the following declaration within the element of AndroidManifest.xml.<uses-library android:name="org.apache.http.legacy" android:required="false" />
Add the following in your app module build.gradle, This will take care of both Mist Core SDK and DR SDK
implementation 'com.mist:core-sdk:2.0.0’
While manually setting up SDK, include both 'Mist Core SDK' and 'DR SDK' in you application project.
- Download 'sdk-framework.aar' and 'mist-mobile.aar' from SDK release folder
- Add following to app/build.gradle in dependencies
implementation(name:‘sdk_framework’, ext:‘aar’)implementation(name:‘mist-mobile’, ext:‘aar’)-
implementation fileTree(include: [‘*.jar’], dir: ‘libs’)In project/build.gradle, add following in repositoriesflatDir { dirs ‘libs’ }
For more details please refer to one of the Sample Apps
To initialize Mist SDK you need organization secret and organization id.
- To get these details please enroll the Device with the Invitation Secret. Invitation secret can be generated
from Mist portal at the following path: Organization -> Mobile SDK.
mstOrgCredentialsManager.enrollDeviceWithToken(invitation_secret); - You will receive the org detail in enrollment callback:
MSTOrgCredentialsCallback.onReceivedSecret(String orgName, String orgID, String orgSecret, String error,String envType) - Use the org info for starting the SDK:
MSTCentralManager mstCentralManager = new MSTCentralManager (application, orgID,orgSecret, mstCentralManagerIndoorOnlyListener); - Call start API of MSTCentralManager to start the SDK:
mstCentralManager.start(); - Call stop on MSTCentralManager to stop receiving callbacks from Mist SDK:
mstCentralManager.stop();
Location response is used to know the position of the user in that particular floorplan. To get location information from Mist SDK implement MSTCentralManagerIndoorOnlyListener callbacks in your application. Following callback returns updated location of the device as a point (X,Y) measured in meters from the map origin:
onRelativeLocationUpdated(MSTPoint relativeLocation, MSTMap[] maps, Date dateUpdated)
You can get the map detail of your current map from the MSTMap[0].
- MSTPoint x: relative x,
- MSTPoint y: relative y,
- hasMotion: is the user in motion ,
- mstPointType: type Cloud,
- Last known latency: latency in the network,
- heading: compass heading,
- headingFlag: availability of compass heading
For more detail, you can see the implementation in the sample app here
For further questions please reach out to support@mist.com