Splunk MINT SDK for Android
4.4
|
Static Public Member Functions | |
static void | initAndStartSession (final Context context, final String apiKey) |
static void | startSession (final Context context) |
static void | closeSession (final Context context) |
static void | flush () |
static void | setUserOptOut (final boolean optedOut) |
static void | disableNetworkMonitoring () |
static final void | setMintCallback (MintCallback mintCallback) |
static void | leaveBreadcrumb (final String breadcrumb) |
static void | logView (final String view) |
static void | logView (final String view, HashMap< String, Object > extraData) |
static void | logEvent (final String eventName) |
static void | logEvent (final String eventName, final MintLogLevel logLevel) |
static void | logEvent (final String eventName, final MintLogLevel logLevel, final HashMap< String, Object > customData) |
static void | logEvent (final String eventName, final MintLogLevel logLevel, final String keyName, final String keyValue) |
static void | setUserIdentifier (final String userIdentifier) |
static void | enableDebug () |
static void | setFlushOnlyOverWiFi (boolean enabled) |
static void | transactionStart (final String name) |
static void | transactionStart (final String name, final HashMap< String, Object > customData) |
static void | transactionStart (final String name, final String keyName, final String keyValue) |
static void | transactionStop (final String name) |
static void | transactionStop (final String name, final HashMap< String, Object > customData) |
static void | transactionStop (final String name, final String keyName, final String keyValue) |
static void | transactionCancel (final String name, final String reason) |
static void | transactionCancel (final String name, final String reason, final HashMap< String, Object > customData) |
static void | transactionCancel (final String name, final String reason, final String keyName, final String keyValue) |
static HashMap< String, Object > | getExtraData () |
static void | addExtraData (final String key, String value) |
static void | addExtraDataMap (final HashMap< String, Object > extras) |
static void | removeExtraData (final String key) |
static void | clearExtraData () |
static int | getTotalCrashesNum () |
static void | clearTotalCrashesNum () |
static String | getLastCrashID () |
static void | logExceptionMap (final HashMap< String, Object > customData, final Exception exception) |
static void | logException (final Exception ex) |
static void | logExceptionMessage (final String key, final String value, final Exception exception) |
static void | xamarinException (final Exception exception, final boolean handled, final HashMap< String, Object > customData) |
static void | enableLogging (final boolean enable) |
static void | setLogging (final int lines) |
static void | setLogging (final String filter) |
static void | setLogging (final int lines, final String filter) |
static JSONObject | getDevSettings () |
static void | addURLToBlackList (final String url) |
static final String | getSessionId () |
static final String | getMintUUID () |
Static Public Attributes | |
static final String | XSplunkMintSessionIdHeader = "X-Splunk-Mint-Session-id" |
static final String | XSplunkMintUuidHeader = "X-Splunk-Mint-uuid" |
The Mint class represents the main class for the Splunk MINT SDK for Android.
|
inlinestatic |
Adds a key-value pair to the extra data.
key | The key. |
value | The value. |
|
inlinestatic |
Adds a map to the extra data.
extras | The map of extra data. |
|
inlinestatic |
Adds a URL to the network monitoring blacklist. Network calls with this URL are ignored.
url | The URL to ignore. |
|
inlinestatic |
Clears all extra data.
|
inlinestatic |
Clears the total number of crashes. This method is blocking, so it must run on a new thread or as an AsyncTask
.
|
inlinestatic |
Closes the active session.
context | The context of the application. |
|
inlinestatic |
Disables network monitoring. You must call this before the initAndStartSession method.
|
inlinestatic |
Enables the display of debug messages.
Note You should turn this feature off in production.
|
inlinestatic |
Enables LogCat logging.
enable | true to enable LogCat logging, false to disable it. |
|
inlinestatic |
Flushes all saved data.
|
inlinestatic |
Gets the developer settings from the Remote Settings.
|
inlinestatic |
Gets the extra data map.
|
inlinestatic |
Gets the error hash of the last crash. This method is blocking, so it must run on a new thread or as an AsyncTask
.
null
if no crash.
|
inlinestatic |
Returns the MINT universally unique identifier (UUID), which uniquely identifies a specific user.
|
inlinestatic |
Returns the current session ID.
|
inlinestatic |
Gets the total number of crashes. This method is blocking, so it must run on a new thread or as an AsyncTask
.
|
inlinestatic |
Use this constructor to initialize and start the session. This constructor validates the API key, initializes the plugin environment, installs the exception handler, and sends a PING request or a PING_WITH_SETTINGS request to receive new remote settings.
context | The context of the application. |
apiKey | The API key you received for the project. |
|
inlinestatic |
Leaves a breadcrumb at a point of interest in your code.
breadcrumb | The name of the breadcrumb. |
|
inlinestatic |
Logs an event and uses the default log level Verbose
.
eventName | The name of the event. |
|
inlinestatic |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
|
inlinestatic |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
customData | The HashMap containing custom data. |
|
inlinestatic |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
inlinestatic |
Submits a handled exception (if inside a try-catch
block) and a map of custom data.
ex | The handled exception. |
|
inlinestatic |
Submits a handled exception (if inside a try-catch
block) and a map of custom data.
customData | The HashMap containing custom data. |
exception | The handled exception. |
|
inlinestatic |
Submits a handled exception (if inside a try-catch
block) and a custom key-value pair.
key | The key. |
value | The value. |
exception | The handled exception. |
|
inlinestatic |
Logs a specific view as a Splunk data type.
view | The name of the view. |
|
inlinestatic |
Logs a specific view as a Splunk data type.
extraData | Extra data. |
view | The name of the view. |
|
inlinestatic |
Removes a specific key-value pair from the extra data.
key | The key to remove. |
|
inlinestatic |
Enables MINT to flush data only when there is a WiFi connection.
Note Be sure to add the ACCESS_NETWORK_STATE permission to your AndroidManifest.xml file.
enabled | true to enable sending date over WiFi only, false to disable it. |
|
inlinestatic |
Restricts the number of lines in the LogCat output.
lines | The number of lines to report. |
|
inlinestatic |
Sets a LogCat filter string.
filter | The filter expression. For more information, see [ Filtering Log Output](http://developer.android.com/tools/debugging/debugging -log.html#filteringOutput) on the Android Developers website. |
|
inlinestatic |
Restricts the number of lines in the LogCat output and sets a LogCat filter string.
lines | The number of lines to report. |
filter | The filter expression. For more information, see [ Filtering Log Output](http://developer.android.com/tools/debugging/debugging -log.html#filteringOutput) on the Android Developers website. |
|
inlinestatic |
|
inlinestatic |
Sets an identifier for the current user.
userIdentifier | The user identifier, such as a random ID, an email address, or a user name. |
|
inlinestatic |
Indicates whether to prevent MINT from saving or sending any data for the user.
optedOut | true to enable user opt-out, false to disable it. |
|
inlinestatic |
Starts a new session. This method checks the sent time of the last PING request and creates a new one if more than 60 seconds have passed.
context | The context of the application. |
|
inlinestatic |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
|
inlinestatic |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
customData | The HashMap containing custom data. |
|
inlinestatic |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
inlinestatic |
Starts a transaction.
name | The name of the transaction. |
|
inlinestatic |
Starts a transaction.
name | The name of the transaction. |
customData | The HashMap containing custom data. |
|
inlinestatic |
Starts a transaction.
name | The name of the transaction. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
inlinestatic |
Stops a transaction.
name | The name of the transaction. |
|
inlinestatic |
Stops a transaction.
name | The name of the transaction. |
customData | The HashMap containing custom data. |
|
inlinestatic |
Stops a transaction.
name | The name of the transaction. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
inlinestatic |
Used to report exceptions from Xamarin
exception | |
handled | |
customData |
|
static |
The header name to use for HTTP.
|
static |
The header name to use for HTTP.