When a method accepts optional parameters, they must be sent as a
Any examples with a
params object assumes that a HashMap has already been declared like in the following example:
Map<String, String> params = new HashMap<String, String>();
Add optional params by using the
Clear your HashMap by using the
Call this method to initiate the SDK.
apa message will be sent on first run.
Note The Enterprise SDK creates a user identifier, referred to as the sender ID. This ID can be substituted with another identifier (i.e. Your own ID). When substituting with another identifier, ensure that it is an integer, otherwise it will not pass.
Warning Using a custom sender ID instead of the one generated by the SDK can result in potential drawbacks for marketing and analytics. For further information, please contact your CSM or Upsight Support.
|The API Key of your application. This key is automatically generated when you set up your application in your Dashboard.|
Determines whether you send data to Upsight Analytics Test or Production servers.
For Production, set this parameter to: |
|A unique, unsigned 64-bit integer in the form of an NSString. This parameter denotes the unique identifier of the application user. If your application creates user IDs larger than 64-bits, you must convert the user ID to an unsigned 64-bit integer to send to Upsight Analytics. For more information click here.|
Start a session. The SDK generates a user ID automatically.
Kontagent.startSesssion("<apikey>", <context>, <SDK_MODE>);
Start a session by specifying your own user ID. This ID will be used in all sent messages.
Kontagent.startSesssion("<apikey>", <context>, <SDK_MODE>, "<sender_id>");
Start a session without sending "Application Added" on first run.
Kontagent.startSession("<apikey>", <context>, <SDK_MODE>, false);
Start a session without sending "Application Added" on first run AND with specifying your own user ID.
Kontagent.startSession("<apikey>", <context>, <SDK_MODE>, "<sender_id>", false);
Call this method to close the session. No parameters are required.
No required parameters.
No optional parameters.
When the application loses focus, you should call this to write all unsent calls to disk.
This method gathers manufacturer, model, OS version, and carrier on launch of the application. You should call this method upon every launch.
No required parameters.
Major version number.
This represents your version number scheme, and is limited to 50 characters.
Valid characters are |
|A JSON object string that is not base64 encoded.|
Kontagent.sendDeviceInformation(null); params.put("v_maj", "1.2.3"); Kontagent.sendDeviceInformation(params);