public class SitumSdk extends 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" />
Constructor and Description |
---|
SitumSdk() |
Modifier and Type | Method and Description |
---|---|
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
|
String |
getVersion()
Returns the version of the Situm SDK
|
static void |
init(android.content.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 void |
setDebugOption(int key,
String value)
Set internal debug options.
|
static void |
setSimulatedLocationManager(LocationManager locationManager)
Set a simulated location manager.
|
public static void init(android.content.Context context)
context
- Your application context.public String getVersion()
public static CommunicationManager communicationManager()
IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static LocationManager locationManager()
IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static Configuration configuration()
IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static DirectionsManager directionsManager()
IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static NavigationManager navigationManager()
IllegalStateException
- if init(Context)
wasn't invoked or no credentials were providedpublic static void setDebugOption(int key, String value)
public static void setSimulatedLocationManager(LocationManager locationManager)
public static boolean isUsingSimulatedLocationManager()
public static long getDeviceID()
IllegalStateException
- if init(Context)
wasn't invoked