Support & Downloads

Quisque actraqum nunc no dolor sit ametaugue dolor. Lorem ipsum dolor sit amet, consyect etur adipiscing elit.

j j

Contact Info
New York +(123) 456 -7890 innovio@mikado-themes.com 184 Main Street Victoria 8007
Folow us on social

ANDROID SDK API REFERENCE

Starting Averous Tracking

The start call will initiate session tracking by the Averous SDK. Please notice that start must be called on the app’s main thread.


void start(String apiKey)

Starts the Averous agent for tracking the current session’s data.

Setting User Information

You can set user-specific information. This information will be displayed in your dashboard along with the automatically collected user properties. These methods can be called any time after calling start().


void setUserId(String userId)

Sets the application specific user identifier. Pass nil to log out the current user.

Parameters:

userID : The application-specific user identifier 

Note: User ID should not exceed 256 UTF-8 bytes and must not contain any personal data (e.g. name, email, phone number).


void setUserProperty(final String propertyName, final Object propertyValue)

Sets a single property for the current user.

Parameters:

propertyName : The name of the property to set. Must be a String. propertyValue : The value of the property to set. Properties must be either Integer, Double, Float, String, Url, Boolean, Date, or a Collection of Strings. 

Note: Property keys should be shorter than 256 characters and may not contain the dot (‘.’) or dollar (‘$’) signs – they will be trimmed. String values should be shorter than 1000 characters.


void setUserProperties(Map<String, Object> userProperties)

Sets multiple (key-value) properties for the current user.

Parameters:

userProperties : The user properties to set. Keys must be Strings. Properties must be either Integer, Double, Float, String, Url, Boolean, Date, or a Collection of Strings. 

 

Note: Property keys should be shorter than 256 characters and may not contain the dot (‘.’) or dollar (‘$’) signs – they will be trimmed. String values should be shorter than 1000 characters.


void incUserProperty(String propertyName, double value)

Increment the value of a numeric property.

Parameters:

propertyName : The name of the user property value : The value to increment or decrement by (if negative)


void appendToUserProperty(String propertyName, String item)

Append an item to a list property.

Parameters:

propertyName : The name of the user property item : The item to append


void removeUserProperty(final String propertyName)

Unsets a property for the current user.

Parameters:

propertyName : The name of the user property


void setLocation(double latitude, double longitude,

float horizontalAccuracy, float verticalAccuracy)

Sets the current user location.

Parameters:

latitude : Latitude in degrees.

longitude : Longitude in degrees.

horizontalAccuracy : Horizontal accuracy.

verticalAccuracy : Vertical accuracy.


void setLocationDescription(String description)

Sets the current user location’s description.

Parameters:

description : A custom string representing the user’s location.

Code Example

JavaReact NativeAppceleratorXamarinPhoneGap

Averous.SetUserId(“1234”);

 

Averous.SetUserProperty(“Role”, “Administrator”)

Map<String, Object> props = new HashMap<String, Object>();

props.put(“Role”, “Administrator”);

props.put(“AmountPaid”, 3.2);

props.put(“RegistrationDate”, DateTime.Now());

Averous.SetUserProperties(props);

Averous.IncUserProperty(“AmountPaid”, 3);

Averous.AppendToUserProperty(“VisitedCities”, “New York”);

Averous.RemoveUserProperty(“Role”);

Masking Sensitive Views

You can mark Views as sensitive, so that their contents will be hidden in the video. These methods can be called any time after calling Averous start:.


void markViewAsSensitive(View view)

Marks a view as sensitive. The view will be blanked out in the video (and also the keyboard attached to it). 

Note: When using findViewById(int id) to find the view to be marked as sensitive,

please make sure that the view is properly initialized and a non-null value is returned as the View object.

Parameters:

view : A View object which contains sensitive information.


void unmarkViewAsSensitive(View view)

Unmark a view as sensitive.

Parameters:

view : A View object which no longer contains sensitive information.


Code Example

JavaReact Native

Averous.markViewAsSensitive(myView)

Adding Application Events

You can add timed application events, such as reaching at a specific screen or level. 

You will see these events in your dashboard along with the video, and you will be able to filter videos according to these events. Adding events is also useful for controlling which sessions are recorded, using a recording condition. For example: you can choose to record sessions of users which reached a specific level.

 

These methods can be called any time after calling start().


void addEvent(String eventName)

Add a timed application event (such as: user reached a specific level or screen).

Parameters:

eventName : The name of the event (ie: “InAppPurchase”).


void addEvent(String eventName, Map<String, Object> properties)

Add a timed application event (such as: user reached a specific level or screen) along with custom properties.

Parameters:

eventName : The name of the event (ie: “Level”).

properties : Key-value pairs with custom properties for the event. Properties can only be Integer, Double, Float, String, Url, Boolean, or Date. 

 

Note: The total size of event name, property key and value should not exceed 300 bytes (per property). Strings are UTF-8 encoded. Events that exceed this limit will be ignored.

Property keys may not contain the dot (‘.’) or dollar (‘$’) signs – they will be trimmed.


Code Example

JavaReact NativeAppceleratorXamarinPhoneGap

Averous.addEvent(“Purchase”); 

 

Map<String, Object> props = new HashMap<String, Object>();

props.put(“ItemType”, “Shoes”);

props.put(“ItemModel”, “Nike”);

props.put(“Price”, 3.2);

props.put(“PurchaseDate”, new Date());

Averous.addEvent(“Purchase”, props);

Adding Screen Actions

Averous automatically detects actions performed on native UI components. To denote actions performed on non-native components you can manually tag custom screen actions.


void addScreenAction(String actionName)

Add a custom action to the current screen.

Parameters:

actionName : The name of the action (ie: “MyButtonClick”). 

Note: Action name should not exceed 256 UTF-8 bytes.


Code Example

JavaReact NativeAppceleratorXamarinPhoneGap

Averous.addScreenAction(“MyButtonClick”);

Controlling Video Recording

You can control video recording using the following methods. The stop/pause/resume are optional and should be only called when you explicitly want to override this behavior:


void stop()

Stops the current video (session tracking will continue). Usually, this method shouldn’t be called unless you explicitly want to stop recording. A new video recording will begin when the app is launched to the foreground.