public abstract class SpringMobileBase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_BACKGROUND
Application-Status flag that should be sent when the application turns to
background
|
static java.lang.String |
APP_CLOSED
Application-Status flag that should be sent when the application terminates
|
static java.lang.String |
APP_FOREGROUND
Application-Status flag that should be sent when the application turns to
foreground
|
static java.lang.String |
APP_STARTED
Application-Status flag that should be sent when the application starts
|
static java.lang.String |
EMPTY
"EMPTY" flag
|
static java.lang.String |
VAR_ACTION
The key word which describes the application status, should be sent as the
key of the application status, (VAR_ACTION, APP_START), (VAR_ACTION,
APP_CLOSED), etc.
|
Constructor and Description |
---|
SpringMobileBase() |
Modifier and Type | Method and Description |
---|---|
void |
commit(java.util.Map<java.lang.String,java.lang.Object> _target)
Send the request to measurement system with all the info in
Map
(name-value-pair). |
java.util.Map<java.lang.String,java.lang.String> |
getEncryptedIdentifiers()
Returns the encrypted (md5) and truncated mobile identifiers.
|
int |
getTimeout()
Returns the timeout in seconds.
|
java.lang.String |
getVersion()
Returns the library version.
|
boolean |
isDebug()
Returns
true if debug messages is activated otherwise
false . |
boolean |
isOfflineMode()
Returns
true if offline mode is on otherwise false . |
boolean |
isTracking()
Returns the
true if the library is active and send requests to
the measurement system. |
void |
removeDebuggerObserver(java.util.Observer observer)
remove the specific Observer associated with KMA library debugging
Observable.
|
void |
removeDebuggerObservers()
remove all the Observers associated with KMA library debugging Observable.
|
void |
setDebug(boolean debug)
If set to
true the library logs some internal actions. |
void |
setDebuggerObserver(java.util.Observer observer)
setDebuggerObserver, implement your own observer to track on the http request
from KMA library.
|
void |
setOfflineMode(boolean offlineMode)
Switch offline mode on or off.
|
void |
setTimeout(int seconds)
Set the timeout in seconds.
|
void |
setTracking(boolean tracking)
If set to
false the library will not send any requests to the
measurement system. |
public static final java.lang.String EMPTY
public static final java.lang.String APP_STARTED
public static final java.lang.String APP_BACKGROUND
public static final java.lang.String APP_FOREGROUND
public static final java.lang.String APP_CLOSED
public static final java.lang.String VAR_ACTION
public boolean isOfflineMode()
true
if offline mode is on otherwise false
.public void setOfflineMode(boolean offlineMode)
offlineMode
- the offlineMode to setpublic int getTimeout()
public void setTimeout(int seconds)
seconds
- The duration of the timeout in seconds.public void setDebuggerObserver(java.util.Observer observer)
observer
- - Your Observerpublic void removeDebuggerObservers()
public void removeDebuggerObserver(java.util.Observer observer)
observer
- - Your Observerpublic void commit(java.util.Map<java.lang.String,java.lang.Object> _target)
Map
(name-value-pair)._target
- A Map with all name-value-pair.public boolean isTracking()
true
if the library is active and send requests to
the measurement system.true
if the library is active and send requests to the
measurement system.public void setTracking(boolean tracking)
false
the library will not send any requests to the
measurement system.tracking
- set to true to enable tracking.public boolean isDebug()
true
if debug messages is activated otherwise
false
.true
if debug messages is activated otherwise
false
.public void setDebug(boolean debug)
true
the library logs some internal actions. Use this
to check the implementation.debug
- set to true to enable debugging.public java.lang.String getVersion()
public java.util.Map<java.lang.String,java.lang.String> getEncryptedIdentifiers()