Beaconstac's side-by-side Android SDK integration with CleverTap
allprojects {
repositories {
…
maven {
url "https://dl.bintray.com/mobstac/maven"
}
…
}
}
implementation 'co.nearbee:nearbeesdk:2.1.7'
implementation 'co.nearbee:nearbee-clevertap:1.0'
Add the keys to your AndroidManifest.xml
<meta-data
android:name="co.nearbee.api_key"
android:value="YOUR_API_KEY" />
<meta-data
android:name="co.nearbee.organization_id"
android:value="YOUR_ORG_ID" />
<meta-data
android:name="CLEVERTAP_ACCOUNT_ID"
android:value="YOUR_ACCOUNT_ID" />
<meta-data
android:name="CLEVERTAP_TOKEN"
android:value="YOUR_TOKEN" />
Builder will return null
if location permission is not granted.
CleverTapWrapper cleverTapWrapper = new CleverTapWrapper.Builder(context).build(new CleverTapWrapper.ErrorListener() {
@Override
public void onError(Exception e) {
// Need location permission
}
});
cleverTapWrapper.enableBeaconMonitoring(true);
cleverTapWrapper.enableGeoFenceMonitoring(true);
boolean beaconMonitoringEnabled = cleverTapWrapper.isBeaconMonitoringEnabled();
boolean geofenceMonitoringEnabled = cleverTapWrapper.isGeoFenceMonitoringEnabled();