Reference Guide
You can customize the notification by passing a notification to the startScan call, or just pass null
and the SDK will use the default notification.
mFootmarksAPI.startScan(notification, new FootmarksAPI.InitCallback() {
@Override
public void onError(FootmarksSdkError footmarksSdkError) {
Log.w(TAG, String.format("Error type:%1$s message:%2$s",
footmarksSdkError.getError().toString(), footmarksSdkError.getMessage()));
switch (footmarksSdkError.getError()) {
case LOCATION_PERMISSION_NOT_ENABLED:
break;
case BLUETOOTH_NOT_ON:
break;
case BLE_NOT_SUPPORTED:
break;
}
}
Note
mFootmarksAPI.stopScan() call will stop the scanning.
Handling Beacon and Experience Responses
Callback Methods
There are two callbacks you can define on the FootmarksAPI class instance. They should be used
after getting an instance from the init() call. You register for them by calling:
mFootmarksAPI.onRangeBeacons(beaconList -> {
// Description: Returns all beacons currently in range of the user.
// Your processing code goes here
})
and
mFootmarksAPI.onCompleteExperiences((beacon, experienceList) -> {
//Description: Returns one or more Experience objects, depending on how your
//experiences/beacons/zones are setup in the management console.
// Your processing code goes here
});
Casting Experience Objects
Java
switch(exp.getType()){
case ExperienceTypeImage:
ImageExp image = ((ImageExp)exp);
ProgressBar progress(ProgressBar)findViewById(R.id.progress);
image.presentPictureInImageView((ImageView)
row.findViewById(R.id.image), progress);
break;
case ExperienceTypeVideo:
VideoExp video = ((VideoExp)exp);
String url = video.videoUrl;
break;
ExtremeLocation Android SDK
ExtremeLocation Android SDK Reference Guide for version 3.1.0 9










