Hello i download de SDK Indoor, for 6 beacons, i install the project, follow instructions , then in the page https://cloud.estimote.com/#/apps go to link Apps, i add a new App in the option Your Own App and get App ID, App Token.
- i added this line to your build.gradle file:
dependencies {
compile ‘com.estimote:indoorsdk:2.3.0’
}
I run it but have this error:
Oops! it seems you dont have any location on your Cloud account. Head to http://develeloper.estimote.com/indoor to learn how to create one!
- Then i try this, but when i add the follow code to my class the import dont work because the lines after val cloudManager have errors
val cloudManager = IndoorCloudManagerFactory().create(applicationContext, cloudCredentials)
cloudManager.getLocation(“your location id here”, object : CloudCallback {
override fun success(locations: Location?) {
// do something with your location here. You will need it to init IndoorManager and IndoorView
}
override fun failure(serverException: EstimoteCloudException?) {
// handle error here
}
})
The whole class is the follow:
package com.estimote.indoorapp
import android.app.Application
import com.estimote.cloud_plugin.common.EstimoteCloudCredentials
import com.estimote.indoorsdk_module.cloud.CloudCallback
import com.estimote.indoorsdk_module.cloud.EstimoteCloudException
import com.estimote.indoorsdk_module.cloud.IndoorCloudManagerFactory
import com.estimote.indoorsdk_module.cloud.Location
/**
-
START YOUR JOURNEY HERE!
-
Main app class
*/
class IndoorApplication : Application() {// This is map for holding all locations from your account.
// You can move it somewhere else, but for sake of simplicity we put it in here.
val locationsById: MutableMap<String, Location> = mutableMapOf()// !!! ULTRA IMPORTANT !!!
// Change your credentials below to have access to locations from your account.
// Make sure you have any locations created in cloud!
// If you don’t have your Estimote Cloud Account - go to https://cloud.estimote.com/ and create oneval cloudCredentials = EstimoteCloudCredentials(“victor”, “045cde”)
val cloudManager = IndoorCloudManagerFactory().create(applicationContext, cloudCredentials)
cloudManager.getLocation(“Oficina”, object : CloudCallback {
fun success(locations: Location?) {
// do something with your location here. You will need it to init IndoorManager and IndoorView
}fun failure(serverException: EstimoteCloudException?) { // handle error here }
})
}