Methods

isStarted

Indicates whether the SDK is started. The SDK started automatically if you setted up config.xml.

R1SDK.isStarted(function (isStarted) {
//...
});

setApplicationUserId

Set optional current user identifier.

R1SDK.setApplicationUserId("Your application user id");

getApplicationUserId

Callback arguments: (string applicationUserId)

Get last setted application user identifier.

R1SDK.getApplicationUserId(function (applicationUserId) {
//...
});

setGeofencingEnabled

Enable or disable the Geofencing service in the SDK.

R1SDK.setGeofencingEnabled(true);

isGeofencingEnabled

Callback arguments: (bool isGeofencingEnabled)

Indicates whether Geofencing service is enabled.

R1SDK.isGeofencingEnabled(function (isGeofencingEnabled) {
//...
});

setEngageEnabled

Enable or disable the Engage in the SDK.

R1SDK.setEngageEnabled(true);

isEngageEnabled

Callback arguments: (bool isEngageEnabled)

Indicates whether Engage is enabled.

R1SDK.isEngageEnabled(function (isEngageEnabled) {
//...
});

R1LocationService

setEnabled

Enable or disable the location service for giving location in the SDK.

R1LocationService.setEnabled(true);

isEnabled

Callback arguments: (bool isEnabled)

Indicates whether R1LocationService is enabled.

R1LocationService.isEnabled(function (isEnabled) {
//...
});

setAutoupdateTimeout

When location service is enabled location information will be sent automatically. However, locationService doesn’t fetch the location constantly. For instance, when the location is received the SDK will turn off the location in CLLocationManager and wait 10 minutes (by default) before attempting to retrieve it again. You can change this value.

R1Emitter

isStarted

Indicates whether the Emitter has started. The Emitter starts automatically if you set the upcom.radiumone.r1connect.applicationId key in config.xml.

R1Emitter.isStarted(function (isStarted) {
//...
});

setAppName

The application name associated with this emitter. By default, this property is populated with the CFBundleName string from the application bundle. If you wish to override this property, you must do so before making any tracking calls.

R1Emitter.setAppName("Custom application name");

getAppName

Callback arguments: (string appName)

Get last setted application name or CFBundleName by default.

R1Emitter.getAppName(function (appName) {
//...
});

setAppId

The application identifier associated with this emitter. If you wish to set this property, you must do so before making any tracking calls. Note: that this is not your app's bundle id, like e.g. com.example.appname.

R1Emitter.setAppId("12345678");

getAppId

Callback arguments: (string appId)

Get last setted app id.

R1Emitter.getAppId(function (appId) {
//...
});

setAppVersion

The application version associated with this emitter. By default, this property is populated with theCFBundleShortVersionString string from the application bundle. If you wish to override this property, you must do so before making any tracking calls.

R1Emitter.setAppId("12345678");

getAppVersion

Callback arguments: (string appVersion)

Get last setted app version or CFBundleShortVersionString string from the application bundle.

R1Emitter.getAppVersion(function (appVersion) {
//...
});

setSessionTimeout

Indicates how long, in seconds, the application must transition to the inactive or background state for before the tracker will automatically indicate the start of a new session when the app becomes active again by setting sessionStart to true. For example, if this is set to 30 seconds, and the user receives a phone call that lasts for 45 seconds while using the app, upon returning to the app, the sessionStart parameter will be set to true. If the phone call instead lasted 10 seconds, sessionStart will not be modified.