Util

object Util

Provides basic Utilities for the Snowplow Tracker.

Functions

Link copied to clipboard
fun addToMap(key: String?, value: Any?, map: MutableMap<String, Any>)

Inserts a value into a map safely.

Link copied to clipboard

Encodes a string into Base64.

Link copied to clipboard

Converts a byte array back into an event map for sending.

Link copied to clipboard

Returns the Application Context

Link copied to clipboard
Link copied to clipboard

Returns the Geo-Location Context

Link copied to clipboard

Returns the location of the android device.

Link copied to clipboard

Count the number of bytes a string will occupy when UTF-8 encoded

Link copied to clipboard

Checks whether or not the device is online and able to communicate with the outside world.

Link copied to clipboard

Joins a list of Longs into a single string

Link copied to clipboard
fun mapHasKeys(map: Map<String, Any>, vararg keys: String): Boolean

Checks if a map contains a range of keys

Link copied to clipboard

Converts a map with Object values into String values.

Link copied to clipboard

Converts an event map to a byte array for storage.

Link copied to clipboard

Converts a StackTrace to a String

Link copied to clipboard

Returns the current System time as a String.

Link copied to clipboard

Generates a random UUID for each event.