public class SitumSdk
extends java.lang.Object
You must call init(Context)
inside Application#onCreate()
in your Application to initialize the SDK.
After initialized, you can provide the authentication credentials and configure the Situm SDK with configuration()
.
Also, you can set the credentials in the AndroidManifest.xml
file, it will be loaded automatically. To do this, use this meta-data fields:
<meta-data
android:name="es.situm.sdk.API_USER"
android:value="API_USER_EMAIL" />
<meta-data
android:name="es.situm.sdk.API_KEY"
android:value="API_KEY" />
Modifier and Type | Field and Description |
---|---|
static HttpClient |
httpClient |
Constructor and Description |
---|
SitumSdk() |
Modifier and Type | Method and Description |
---|---|
static CalibrationManager |
calibrationManager()
Returns the CalibrationManager which can be used to calibrate Buildings.
|
static CommunicationManager |
communicationManager()
Returns the communication manager.
|
static Configuration |
configuration()
Returns the public configuration holder.
|
static DirectionsManager |
directionsManager()
Returns the route manager.
|
static long |
getDeviceID()
Return the device ID used internally in the SDK
|
static java.lang.String |
getVersion()
Returns the version of the Situm SDK
|
static void |
init(Context context)
Initialize SDK.
|
static boolean |
isUsingSimulatedLocationManager()
Return true if a simulated location manager is set, false otherwise
|
static LocationManager |
locationManager()
Returns the location manager.
|
static NavigationManager |
navigationManager()
Returns the navigation manager.
|
static RealTimeManager |
realtimeManager()
Returns realtime manager.
|
static void |
setDebugOption(int key,
java.lang.String value)
Set internal debug options.
|
static void |
setSimulatedLocationManager(LocationManager locationManager)
Set a simulated location manager.
|
public static void init(Context context)
context
- Your application context.public static java.lang.String getVersion()
public static CommunicationManager communicationManager()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static LocationManager locationManager()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static Configuration configuration()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static DirectionsManager directionsManager()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static NavigationManager navigationManager()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static RealTimeManager realtimeManager()
RealTimeManager
check for more info.java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static CalibrationManager calibrationManager()
es.situm.sdk.calibration.CalibrationManager
for more info on its usage.java.lang.IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static void setDebugOption(int key, java.lang.String value)
public static void setSimulatedLocationManager(LocationManager locationManager)
public static boolean isUsingSimulatedLocationManager()
public static long getDeviceID()
java.lang.IllegalStateException
- if init(Context)
wasn't invoked