NAV

Introduction

Welcome to the Proximi.io Android SDK reference. Use our library to hook into the Proximi.io platform.

You can find the iOS reference here.

Code samples can be found on the right side of the page, and a sample Android project can be found here.

API Changelog

2.5.6

2.5.5

2.5

  • Deprecated the old Proximiio API. The old API still works, but it’s recommended to migrate to the new ProximiioAPI as soon as possible. See the Getting Started section for help. Please don’t mix old and new APIs. As a result, if you use ProximiioGoogleMapHelper, you must use the new API or stay with 2.4.3. The new API has all the same functionality except it doesn’t generate notifications from push outputs. See here for help with notifications.
  • The SDK now has the capability to report all sorts of BLE devices, and as a result, the ProximiioBeacon class has been replaced with ProximiioBLEDevice, and ProximiioListener.foundBeacon and ProximiioListener.lostBeacon have been renamed to ProximiioListener.foundDevice and ProximiioListener.lostDevice.
  • Added support for polygon geofences (ProximiioGeofence.getPolygon) and changed ProximiioGeofence.getOfflineOutput to ProximiioGeofence.getMetadata.
  • Added ProximiioGoogleMapHelper.pathfindingTo and changed ProximiioGoogleMapHelper.Builder.geofenceMarkerRadiusColor to ProximiioGoogleMapHelper.Builder.geofenceMarkerAreaColor to reflect support for polygon geofences.
  • Added ProximiioListener.geofenceEventMetadata to provide a way to add metadata to geofence events.
  • Deprecated ProximiioListener.push. Please use ProximiioListener.output instead.
  • Added 64-bit support. Please review the build.gradle and make sure your native libraries produce native code for all your supported platforms.
  • Changed the minSdkVersion from 10 to 14.

Adding the SDK

android {
    ...
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
    }
}

repositories {
    ...
    maven {
        url "http://proximi-io.bintray.com/proximiio-android"
    }
    maven {
        url "http://indooratlas-ltd.bintray.com/mvn-public"
    }
}

dependencies {
    ...
    compile 'io.proximi.proximiiolibrary:proximiiolibrary:2.5.6'
}

Add the following to your module’s build.gradle file.

Here is the latest version: Download

(Just replace the version number in the build.gradle with the latest version.)

If you are using a build system other than Gradle, please see Bintray’s instructions to setting things up. (Big blue “Set me up!” -button). You also need to make the IndoorAtlas dependency available in a similar fashion.

Getting Started

Your Own Listener

class MainActivityListener extends ProximiioListener {
    private ProximiioAPI proximiioAPI;
    @Nullable private MainActivity main;

    private static final String ID = "MainActivityListener";
    private static final String AUTH_KEY = "YOUR_AUTH_KEY_HERE"; // TODO: Replace with your own!

    // Create a new API object with our ID.
    // This ID will be used to replace any existing listener with the same ID.
    // This is useful when we exit to background and come back to create a new listener.
    MainActivityListener(@NonNull MainActivity mainActivity) {
        main = mainActivity;
        proximiioAPI = new ProximiioAPI(ID, mainActivity);
        proximiioAPI.setActivity(mainActivity);
        proximiioAPI.setListener(this);
        proximiioAPI.setAuth(AUTH_KEY);
    }

    void onDestroy() {
        // Set to null to avoid memory leaks.
        main = null;

        // Destroy this API object.
        // Parameter true indicates that we'd like to keep our listener working on the background.
        proximiioAPI.destroy(true);
    }

    void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        proximiioAPI.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

    void onActivityResult(int requestCode, int resultCode, Intent data) {
        proximiioAPI.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void position(double lat, double lon, double accuracy) {
        // Do something with the positioning system.
        // See ProximiioListener for all methods that can be overridden.
        if (main != null) {
            main.someAction();
        }
        Log.d(ID, "Position update! (" + lat + ", " + lon + ")");
    }
}

Create a new class, which extends ProximiioListener. This class will act as your entry point to Proximi.io. Here you can see an example of such a class, with full background operation capabilities.

Let’s go over what’s going on in this example.

Constructor

First we assign a reference to our Activity. This can be used to call methods on our Activity later. If you don’t require such functionality, you can erase all references to the variable main.

Next, we create a new API object with our ID and context. The ID is used to match and replace existing listeners (for example, when resuming from background). As such, it’s recommended to create a new listener class with its own unique ID for each Activity that requires distinct features from Proximi.io. This way your API objects and listeners are more closely tied to the lifecycle of the Activity that needs that functionality.

On the next line, proximiioAPI.setActivity(mainActivity), you can see that the Activity is supplied to Proximi.io for user interaction. This is a necessary step if you wish Proximi.io to ask for required permissions, location, Bluetooth, and more. Proximi.io will use this Activity reference to create these UI popups if needed. You need to supply Proximi.io with the results of the user interaction by calling onRequestPermissionsResult and onActivityResult on your listener / API object. If you want to check for permissions and other requirements yourself, you can delete this line and the two related methods.

On the next two lines, the listener and auth key for the API object are set. The listener will receive callbacks and data from Proximi.io, and the auth key is used to authorize the Proximi.io SDK to your data on our servers. Check here for more information on setAuth.

onDestroy

The onDestroy method is supposed to be called when the related Activity is destroyed.

On the first line our Activity reference is set to null. This allows the garbage collector to remove the Activity from memory, as no references are set to it. The Proximi.io background service has a reference to your listener (through proximiioAPI.setListener), and if your listener keeps a reference to your Activity on the background, it will be leaked.

The next method, proximiioAPI.destroy, destroys the API object and cleans up connections to the Proximi.io background service. Parameter true indicates that we want the listener to continue working on the background. With a false parameter, the listener would be removed before destruction. If you need the API object reference on the background, it’s okay not to destroy it, as long as you call proximiioAPI.setActivity(null) instead. On the other extreme, if you wish to terminate the Proximi.io background service and cease all operations, you can call proximiioAPI.destroyService instead.

onRequestPermissionsResult and onActivityResult

As previously mentioned, these should be used to inform Proximi.io about user interactions, if an Activity is set through proximiioAPI.setActivity.

position

This is one of the methods you can override from ProximiioListener. This one, for example, will be called each time Proximi.io obtains a new position update. We check if our Activity is not null (we’re not on background) and call a method to inform the running Activity about what happened. Last we log the position. You can see all possible methods to override here.

Your Activity

public class MainActivity extends AppCompatActivity {
    private MainActivityListener listener;

    void someAction() {
        // Triggered by position updates.
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        listener = new MainActivityListener(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        listener.onDestroy();
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        listener.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        listener.onActivityResult(requestCode, resultCode, data);
    }
}

Here’s an example of how you would use your listener.

What Next?

ProximiioAPI

proximiioAPI = new ProximiioAPI("MyProximi.io", context);

ProximiioAPI is your entry point to SDK capabilities.

Create a new instance with an ID and Context to get started.

setActivity

proximiioAPI.setActivity(MainActivity.this);

public void setActivity(@Nullable Activity activity)

Enable asking the user for permissions, location and Bluetooth if needed. Please hook your Activity to call ProximiioAPI.onRequestPermissionsResult and ProximiioAPI.onActivityResult to inform Proximi.io about the results.

If you don’t call ProximiioAPI.destroy or ProximiioAPI.destroyService when the supplied Activity is destroyed, it’s necessary to call this method with a null parameter instead.

setListener

public void setListener(@Nullable ProximiioListener listener)

Set a listener for Proximi.io events. Call with a null listener to remove.

setAuth

proximiioAPI.setAuth("exampleauthkey");

public void setAuth(@NonNull String token)

Set the authorization key for Proximi.io. Use this or ProximiioAPI.setLogin to contact Proximi.io servers and begin operation. If this is successful, ProximiioAPI.trySavedLogin can be used in the future instead if desired.

This is only necessary to call once in your application’s lifecycle, but subsequent calls make no harm.

You can find your authorization keys in your web portal (or use the shared portal) under “Manage Applications”. Click the token of the application you want to use and copy paste it to your setAuth method. Please note that application keys are read-only.

setLogin

proximiioAPI.setLogin("example@dev.com", "password");

public void setLogin(@NonNull String email, @NonNull String password)

Login. This or ProximiioAPI.setAuth is needed to contact Proximi.io servers and begin operation. Sets the login information required for ProximiioAPI.trySavedLogin if successful.

This is only necessary to call once in your application’s lifecycle, but subsequent calls make no harm.

trySavedLogin

proximiioAPI.trySavedLogin();

public boolean trySavedLogin()

If this client has logged in successfully in the past, try those same credentials. Note that ProximiioListener.loginFailed can still be called, as this doesn’t guarantee a successful login.

Returns true if previous credentials were found and login was attempted.

register

proximiioAPI.register("new.account@example.com", "password", "Test", "Person", "Testing Company", "Canada", "Freelance developer");

public void register(@NonNull String email, @NonNull String password, @NonNull String firstName, @NonNull String lastName, @NonNull String company, @NonNull String country, @NonNull String background)

Registers a new account to Proximi.io. Fires either ProximiioListener.registered or ProximiioListener.registrationFailed.

destroy

proximiioAPI.destroy(false);

public void destroy(boolean backgroundListener)

Call this when you’re done with this API object. Set the parameter to true if you want your listener to keep working on the background.

destroyService

proximiioAPI.destroyService(false);

public void destroyService(boolean eraseData)

Set eraseData to true if you want to delete all data that Proximi.io has saved, including auth keys and offline data. With false, Proximi.io will only stop all operations until a new instance of ProximiioAPI is created.

setApplication

proximiioAPI.setApplication("APP_ID");

public void setApplication(@Nullable String applicationID)

Set the application you would like to use. If null is specified or this method hasn’t been called, the first application available will be used.

getVisitorID

String visitorID = proximiioAPI.getVisitorID();

public String getVisitorID()

Get the visitor ID of the client in the Proximi.io system.

setForceBluetooth

public void setForceBluetooth(boolean forced)

Set this to true to force Bluetooth scanning on regardless of power saving status. Once set to false, normal power saving modes will continue shortly.

customInputPosition

public void customInputPosition(String customInputID, double lat, double lon, double accuracy)

Provide a position update for Proximi.io with a previously added custom input.

onRequestPermissionsResult

public class MainActivity extends AppCompatActivity {
    ...

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        proximiioAPI.onRequestPermissionsResult(requestCode, permissions, grantResults);
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}

public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)

Override onRequestPermissionsResult in your Activity and send the results here if you have set an Activity with ProximiioAPI.setActivity.

onActivityResult

public class MainActivity extends AppCompatActivity {
    ...

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        proximiioAPI.onActivityResult(requestCode, resultCode, data);
        super.onActivityResult(requestCode, resultCode, data);
    }
}

public void onActivityResult(int requestCode, int resultCode, Intent data)

Override onActivityResult in your Activity and send the results here if you have set an Activity with ProximiioAPI.setActivity.

addPlace

public boolean addPlace(String name, double lat, double lon, @Nullable String address, @Nullable String indoorAtlasVenueID, @Nullable String[] tags)

Add a new place. Returns true if validation was successful.

addFloor

public boolean addFloor(String name, @Nullable String indoorAtlasFloorPlanID, @Nullable String floorPlanURL, ProximiioPlace place, @Nullable Integer floorNumber)

Add a new floor. Returns true if validation was successful.

addDepartment

public boolean addDepartment(String name, ProximiioFloor floor, String[] tags, @Nullable Boolean exclusiveTrilateration, @Nullable Boolean modifyPositioning, @Nullable Boolean eddystones, @Nullable Boolean iBeacons, @Nullable Boolean indoorAtlas, @Nullable Boolean nativePositioning)

Add a new department. Returns true if validation was successful.

addInput

public boolean addInput(String name, @Nullable ProximiioDepartment department, ProximiioInput.InputType type, double lat, double lon, @Nullable ProximiioBeaconFilter filter)

Add a new input. Returns true if validation was successful.

addGeofence

public boolean addGeofence(String name, @Nullable ProximiioNetworkObject department, double lat, double lon, double radius, @Nullable String address, @Nullable JSONObject metadata)

public boolean addGeofence(String name, @Nullable ProximiioNetworkObject department, double[][] polygon, @Nullable String address, @Nullable JSONObject metadata)

Add a new geofence. Returns true if validation was successful.

addApplication

public boolean addApplication(String name, boolean eddyStones, boolean iBeacons, boolean indoorAtlas, @Nullable String indoorAtlasApiKey, @Nullable String indoorAtlasApiKeySecret, boolean nativePositioning, ProximiioApplication.NativeAccuracy nativeAccuracy, @Nullable Boolean bluetoothTrilateration, @Nullable Boolean remoteMode, @Nullable Boolean isNetworkInterval, @Nullable Integer networkInterval, @Nullable Boolean geofencePositioning, @Nullable Integer nativeActivationTime)

Add a new application. Returns true if validation was successful.

editPlace

public boolean editPlace(String name, double lat, double lon, @Nullable String address, @Nullable String indoorAtlasVenueID, @Nullable String[] tags, @Nullable ArrayList<ProximiioPathfindingNode> nodes, String id)

Edit a place. Returns true if validation was successful.

editFloor

public boolean editFloor(String name, @Nullable String indoorAtlasFloorPlanID, @Nullable String floorPlanURL, ProximiioPlace place, @Nullable Integer floorNumber, String id)

Edit a floor. Returns true if validation was successful.

editDepartment

public boolean editDepartment(String name, ProximiioFloor floor, String[] tags, @Nullable Boolean exclusiveTrilateration, @Nullable Boolean modifyPositioning, @Nullable Boolean eddystones, @Nullable Boolean iBeacons, @Nullable Boolean indoorAtlas, @Nullable Boolean nativePositioning, String id)

Edit a department. Returns true if validation was successful.

editInput

public boolean editInput(String name, @Nullable ProximiioDepartment department, ProximiioInput.InputType type, double lat, double lon, @Nullable ProximiioBeaconFilter filter, String id)

Edit an input. Returns true if validation was successful.

editGeofence

public boolean editGeofence(String name, @Nullable ProximiioNetworkObject department, double lat, double lon, double radius, @Nullable String address, @Nullable JSONObject metadata, String id)

public boolean editGeofence(String name, @Nullable ProximiioNetworkObject department, double[][] polygon, @Nullable String address, @Nullable JSONObject metadata, String id)

Edit a geofence. Returns true if validation was successful.

editApplication

public boolean editApplication(String name, boolean eddyStones, boolean iBeacons, boolean indoorAtlas, @Nullable String indoorAtlasApiKey, @Nullable String indoorAtlasApiKeySecret, boolean nativePositioning, ProximiioApplication.NativeAccuracy nativeAccuracy, @Nullable Boolean bluetoothTrilateration, @Nullable Boolean remoteMode, @Nullable Boolean isNetworkInterval, @Nullable Integer networkInterval, @Nullable Boolean geofencePositioning, @Nullable Integer nativeActivationTime, String id)

Edit an application. Returns true if validation was successful.

deletePlace

public void deletePlace(String id)

Delete a place.

deleteFloor

public void deleteFloor(String id)

Delete a floor.

deleteDepartment

public void deleteDepartment(String id)

Delete a department.

deleteInput

public void deleteInput(String id)

Delete an input.

deleteGeofence

public void deleteGeofence(String id)

Delete a geofence.

deleteApplication

public void deleteApplication(String id)

Delete an application.

ProximiioListener

ProximiioListener is a set of callbacks to inform you about events and updates.

geofenceEnter

@Override
public void geofenceEnter(ProximiioGeofence geofence) {
    Log.d("MainActivity", "Entered geofence: " + geofence.getName());
}

public void geofenceEnter(ProximiioGeofence geofence)

Called when this client enters a geofence.

geofenceExit

@Override
public void geofenceExit(ProximiioGeofence geofence, @Nullable Long dwellTime) {
    Log.d("MainActivity", "Exited geofence: " + geofence.getName() + " (" + dwellTime + "s)");
}

public void geofenceExit(ProximiioGeofence geofence, @Nullable Long dwellTime)

Called when this client exits a geofence. Dwell time is provided in seconds.

loginFailed

@Override
public void loginFailed(LoginError loginError) {
    switch (loginError) {
        case LOGIN_FAILED:
            Log.e("MainActivity", "Incorrect login credentials!");
            break;
        default:
            Log.e("MainActivity", "Please try again later!");
            break;
    }
}

public void loginFailed(LoginError loginError)

This is called if login fails.

enum LoginError

Key Description
LoginError.LOGIN_FAILED Incorrect login credentials.
LoginError.NETWORK_ERROR Network timed out. If you have previously authenticated successfully, you can still log in with the same credentials while offline, and this error won’t be fired.
LoginError.UNKNOWN_ERROR Unknown error.

loggedIn

public void loggedIn(boolean online)

This is called when Proximi.io has successfully logged in. Parameter online is true when online capabilities are enabled. Can be called up to two times per authentication attempt.

registrationFailed

@Override
public void registrationFailed(RegistrationError error) {
    switch (error) {
        case INVALID_EMAIL:
            Log.e("MainActivity", "Email was invalid!");
            break;
        case EMAIL_ALREADY_REGISTERED:
            Log.e("MainActivity", "Email address was already registered!");
            break;
        default:
            Log.e("MainActivity", "Please try again later!");
            break;
    }
}

public void registrationFailed(RegistrationError error)

This is called if registration fails.

enum RegistrationError

Key Description
RegistrationError.INVALID_EMAIL Email was invalid/malformed.
RegistrationError.EMAIL_ALREADY_REGISTERED An account with this email exists.
RegistrationError.NETWORK_ERROR Network timed out.
RegistrationError.UNKNOWN_ERROR Unknown error.

registered

public void registered()

This is called when a new account has been successfully added.

position

public void position(double lat, double lon, double accuracy)

Called when Proximi.io has a new position available. This may come from native positioning, IndoorAtlas, BLE devices, or custom inputs, depending on which features are available in the selected application, as well as what is available in the vicinity.

Latitude and longitude are both in WGS84, and accuracy is the position update’s accuracy in meters.

foundDevice

public void foundDevice(ProximiioBLEDevice device, boolean registered)

Called when Proximi.io scans a Bluetooth Low Energy device. Parameter registered indicates whether this device is registered to be used with Proximi.io. This will be called every time a device is scanned.

lostDevice

public void lostDevice(ProximiioBLEDevice device, boolean registered)

Called when a device is lost, either because of a timeout, or because Proximi.io is shutting down. Parameter registered indicates whether this device is registered to be used with Proximi.io.

changedFloor

public void changedFloor(@Nullable ProximiioFloor floor)

Called when Proximi.io detects that this client has entered a floor.

Parameter floor is the floor entered. Null if the floor was changed to unknown.

changedDepartment

public void changedDepartment(@Nullable ProximiioDepartment department)

Called when Proximi.io detects that this client has entered a department.

Parameter department is the department entered. Null if the department was changed to unknown.

geofenceEventMetadata

@Nullable public JSONObject geofenceEventMetadata(double lat, double lon, @Nullable Double accuracy, ProximiioGeofence geofence, @Nullable Long dwellTime, @Nullable ProximiioInput input, ProximiioGeofence.Event event, ProximiioGeofence.EventType type)

You can use this to add your own metadata to geofence events. Simply return a JSONObject you would like to be added to the event. The parameters describe the event. This will be called before each ProximiioListener.geofenceEnter and ProximiioListener.geofenceExit.

dwellTime is available for exit-events.

addedPlace

public void addedPlace(ProximiioPlace place)

Called when a place is added. This is guaranteed to be called for every existing place when you add a listener.

addedFloor

public void addedFloor(ProximiioFloor floor)

Called when a floor is added. This is guaranteed to be called for every existing floor when you add a listener.

addedDepartment

public void addedDepartment(ProximiioDepartment department)

Called when a department is added. This is guaranteed to be called for every existing department when you add a listener.

addedInput

public void addedInput(ProximiioInput input)

Called when an input is added. This is guaranteed to be called for every existing input when you add a listener.

addedGeofence

public void addedGeofence(ProximiioGeofence geofence)

Called when a geofence is added. This is guaranteed to be called for every existing geofence when you add a listener.

addedApplication

public void addedApplication(ProximiioApplication application)

Called when an application is added. This is guaranteed to be called for every existing application when you add a listener.

updatedPlace

public void updatedPlace(ProximiioPlace place)

Called when a place is updated.

updatedFloor

public void updatedFloor(ProximiioFloor floor)

Called when a floor is updated.

updatedDepartment

public void updatedDepartment(ProximiioDepartment department)

Called when a department is updated.

updatedInput

public void updatedInput(ProximiioInput input)

Called when an input is updated.

updatedGeofence

public void updatedGeofence(ProximiioGeofence geofence)

Called when a geofence is updated.

updatedApplication

public void updatedApplication(ProximiioApplication application)

Called when an application is updated.

removedPlace

public void removedPlace(ProximiioPlace place)

Called when a place is removed.

removedFloor

public void removedFloor(ProximiioFloor floor)

Called when a floor is removed.

removedDepartment

public void removedDepartment(ProximiioDepartment department)

Called when a department is removed.

removedInput

public void removedInput(ProximiioInput input)

Called when an input is removed.

removedGeofence

public void removedGeofence(ProximiioGeofence geofence)

Called when a geofence is removed.

removedApplication

public void removedApplication(ProximiioApplication application)

Called when an application is removed.

itemsLoaded

public void itemsLoaded()

Called on listener add, after all items (places, floors, departments, inputs, geofences, applications) have been loaded.

activatedApplication

public void activatedApplication(ProximiioApplication application)

Called when an application is activated.

push

public boolean push(String title)

Deprecated.

Please use ProximiioListener.output instead.

output

public void output(JSONObject json)

public void output(String json)

Called when Proximi.io receives an output.

Parameter json contains the output’s payload.

ProximiioNetworkObject

ProximiioNetworkObject is a base class for ProximiioPlace, ProximiioFloor, ProximiioDepartment, ProximiioInput, and ProximiioGeofence. As such, all the methods here are available on these classes.

getJSON

@Nullable public String getJSON()

Constructs JSON from this object. Returns null if internal parsing fails.

fromJSON

@Nullable public static ProximiioNetworkObject fromJSON(String json, ObjectType type)

Creates a new instance of the specified type based on the provided JSON. Please note, that the object being created doesn’t undergo any normal integrations, meaning that it won’t have references to any other objects, such as its parent or children.

Returns a new instance of the specified type if the JSON is valid, null otherwise.

getType

public ObjectType getType()

Returns the type of this object.

enum ObjectType

Key Can be casted to
ObjectType.PLACES ProximiioPlace
ObjectType.FLOORS ProximiioFloor
ObjectType.DEPARTMENT ProximiioDepartment
ObjectType.INPUTS ProximiioInput
ObjectType.GEOFENCES ProximiioGeofence

getID

public String getID()

Returns a unique ID that represents this object.

getParentID

@Nullable public String getParentID()

Returns this object’s parent’s ID, if this object has or should have a parent.

getParent

@Nullable public ProximiioNetworkObject getParent()

Returns this object’s parent, if available.

getChildren

public ArrayList<ProximiioNetworkObject> getChildren()

Returns a list containing all children of this object.

getParents

public ProximiioNetworkObject[] getParents(int levels)

Returns an array of parents, fetched recursively with getParent. The levels parameter indicates the expected number of parents. If you are unsure about this, you can use ProximiioService.MAX_PARENTS. The returned array’s length will always be levels, but the guaranteed number of found parents is zero.

getAllChildren

public ArrayList<ProximiioNetworkObject> getAllChildren()

Returns a list of all children, as well as all children’s children, and their children, etc, recursively, with getChildren.

getName

public String getName()

Returns this object’s name.

getDescription

@Nullable public String getDescription()

Returns this object’s description.

toString

@Override public String toString()

Returns getName + “, ” + getDescription.

ProximiioPlace

Represents a place.

Parent

  • None

Children

  • ProximiioFloor

getAddress

@Nullable public String getAddress()

Returns the address of this place if available.

getLat

public double getLat()

Returns this place’s latitude, in WGS84.

getLon

public double getLon()

Returns this place’s longitude, in WGS84.

getTags

public String[] getTags()

Returns this place’s tags.

getIndoorAtlasVenueID

@Nullable public String getIndoorAtlasVenueID()

Returns this place’s IndoorAtlas venue, if it exists.

getPath

@Nullable public ProximiioPathfindingResult getPath(double startLat, double startLon, double endLat, double endLon, @Nullable String startFloorID, @Nullable String endFloorID)

Get the shortest path from the specified start location to the specified end location, using the pathfinding data of this place. Returns an instance of ProximiioPathfindingResult if pathfinding data was available and a path was found, null otherwise. Start and end floor IDs are used to make sure the pathfinding starts and ends at the rights floors. With null values, the nearest nodes are used from all floors.

getPathfindingNodes

@Nullable public ArrayList<ProximiioPathfindingNode> getPathfindingNodes()

Get a list of pathfinding nodes. Returns null if none are set.

ProximiioFloor

Represents a floor.

Parent

  • ProximiioPlace

Children

  • ProximiioDepartment

getFloorNumber

@Nullable public Integer getFloorNumber()

Returns this floor’s number. Returns null if it hasn’t been set.

getFloorPlanURL

@Nullable public String getFloorPlanURL()

Returns the URL for the floor plan of this floor, if available.

getIndoorAtlasFloorPlanID

@Nullable public String getIndoorAtlasFloorPlanID()

Returns this floor’s IndoorAtlas floor plan ID, if available.

hasFloorPlan

public boolean hasFloorPlan()

Does this floor have a floor plan? Returns true if this floor has both a floor plan URL and anchors defined.

requestFloorPlanImage

public boolean requestFloorPlanImage(Context context, final ProximiioImageCallback callback)

Request the floor plan image of this floor. The image is cached accordingly for future access. Returns true if the floor plan image is being retrieved. False if this floor doesn’t have a floor plan or a floor plan retrieval is already in progress.

ProximiioImageCallback

Callback for floor plan image loading.

loaded

void loaded(Bitmap bitmap, float floorPlanWidth, float floorPlanHeight, double[] floorPlanPivot)

This is called when the image loading succeeds. The resulting floor plan will be properly rotated and scaled according to the anchors.

Parameter Description
bitmap The bitmap containing the floor plan.
floorPlanWidth The width of the floor plan in meters.
floorPlanHeight The height of the floor plan in meters.
floorPlanPivot The center point of the floor plan in latitude and longitude.

failed

void failed()

Image loading failed for some reason. You may retry here.

getAnchors

@Nullable public double[][] getAnchors()

Get the anchors (a.k.a. the corner points) of this floor. The first one is in the northwest from the center, and the rest follow clockwise. This is an array of four coordinate pairs, defined as latitude and longitude. Returns null if this floor doesn’t specify anchors for the floor plan.

getFloorPlanPivot

@Nullable public double[] getFloorPlanPivot()

Returns the center point of the floor’s floor plan. Returns null if this floor doesn’t have any anchors.

getFloorPlanSideWidth

public float getFloorPlanSideWidth()

Returns the length of the floor plan’s side, that’s the most aligned with the longitunal axis, in meters. Returns zero if this floor doesn’t have any anchors.

getFloorPlanSideHeight

public float getFloorPlanSideHeight()

Returns the length of the floor plan’s side, that’s the most aligned with the latitudinal axis, in meters. Returns zero if this floor doesn’t have any anchors.

getFloorPlanWidth

public float getFloorPlanWidth()

Returns the width of the floor plan’s bounding box in meters. Returns zero if this floor doesn’t have any anchors.

getFloorPlanHeight

public float getFloorPlanHeight()

Returns the height of the floor plan’s bounding box in meters. Returns zero if this floor doesn’t have any anchors.

getFloorPlanHeading

public float getFloorPlanHeading()

Returns the heading/rotation of this floor’s floor plan clockwise in degrees. Returns zero if this floor doesn’t have any anchors.

getFloorPlanFlipped

public boolean getFloorPlanFlipped()

Returns whether or not this floor’s floor plan image is flipped. Returns zero if this floor doesn’t have any anchors.

Comparator

Collections.sort(floors, new ProximiioFloor.Comparator());

This is a class that implements the java.util.Comparator interface, and determines order with floor numbers. This class can be used to sort lists, for example.

ProximiioDepartment

Represents a department.

Parent

  • ProximiioFloor

Children

  • ProximiioInput
  • ProximiioGeofence

getTags

public String[] getTags()

Returns this department’s tags.

isExclusiveTrilateration

public boolean isExclusiveTrilateration()

If the trilateration is happening in this department, do we constrict the trilateration to this department only and drop all other departments’ beacons from trilateration? Defaults to true if it’s not present.

isModifyPositioning

public boolean isModifyPositioning()

Returns true if this department modifies positioning technologies used when the client is in this department. If so, these modifications will persist until another department applies its own modifications. Please note that these modifications do not completely override applications settings; they can’t turn on such technologies that aren’t enabled in the application.

isIBeacons

public boolean isIBeacons()

If this department modifies positioning technologies, do we enable iBeacons?

isEddystones

public boolean isEddystones()

If this department modifies positioning technologies, do we enable Eddystones?

isIndoorAtlas

public boolean isIndoorAtlas

If this department modifies positioning technologies, do we enable IndoorAtlas?

isNativePositioning

public boolean isNativePositioning

If this department modifies positioning technologies, do we enable native positioning?

ProximiioInput

Represents an input.

Parent

  • ProximiioDepartment

Children

  • None

InputType

enum InputType

Key Description
InputType.IBEACON iBeacon-spec BLE device
InputType.EDDYSTONE Eddystone-spec BLE device
InputType.CUSTOM Custom input
InputType.GENERIC_BLE BLE device

getInputType

public InputType getInputType()

Returns the type of this input.

getLat

public double getLat()

Returns this input’s latitude, in WGS84.

getLon

public double getLon()

Returns this input’s longitude, in WGS84.

ProximiioGeofence

Represents a geofence.

Parent

  • ProximiioDepartment

Children

  • None

Event

enum Event

Key Description
Event.ENTER Enter event
Event.EXIT Exit event

EventType

enum EventType

Key Description
EventType.BEACON Single BLE device
EventType.INDOORATLAS IndoorAtlas
EventType.DISCONNECT Shutting down
EventType.NATIVE Native positioning: WiFi, GPS, etc.
EventType.DELETED Geofence deleted
EventType.TRILATERATED Multiple BLE devices
EventType.CUSTOM Custom input

isEntered

public boolean isEntered()

Returns true if this client is inside this geofence.

getAddress

@Nullable public String getAddress()

Returns this geofence’s address if available.

getLat

public double getLat()

Returns this geofence’s latitude, in WGS84.

getLon

public double getLon()

Returns this geofence’s longitude, in WGS84.

getRadius

public double getRadius()

Returns this geofence’s radius, in meters.

getPolygon

@Nullable public double[][] getPolygon()

If this geofence is a polygon, return the polygon. The return value is an array of latitude and longitude pairs, describing the vertices of the polygon in order.

getMetadata

@Nullable public JSONObject getMetadata()

Returns the JSON content set to this geofence.

ProximiioApplication

Settings to be used with mobile devices. You can define multiple applications for different use cases.

NativeAccuracy

enum NativeAccuracy

Key Description
NativeAccuracy.CELLULAR_LOW_POWER Low power, cellular positioning
NativeAccuracy.WIFI_BALANCED_POWER Balanced power, Wifi fingerprint + cellular positioning
NativeAccuracy.GPS_HIGH_POWER GPS + Wifi + cellular, very high power, but accurate.

getString

public String getString()

Returns the String representation of this NativeAccuracy.

getStringValues

public static ArrayList<String> getStringValues()

Returns the String representations of all available NativeAccuracy values.

fromString

public static NativeAccuracy fromString(String s)

Construct a NativeAccuracy from a String. If s is not equal to any of getStringValues, this will return NativeAccuracy.GPS_HIGH_POWER.

getID

public String getID()

Returns the ID of this application.

getName

public String getName()

Returns the name of this application.

isRemoteMode

public boolean isRemoteMode()

Does this application load resources based on the current location?

This should be set to enabled when there are lots of items (over a couple hundred places, inputs, geofences, etc.).

isNetworkInterval

isNetworkInterval()

Returns true if this application sends network data in bursts to save battery.

getNetworkInterval

public int getNetworkInterval()

Returns the burst interval in milliseconds.

getNativeActivationTime

public int getNativeActivationTime()

Returns the time it takes for native positioning to take over after no position updates from other sources, in milliseconds.

isGeofencePositioning

public boolean isGeofencePositioning()

Returns true if this application sends position updates over the network only if the client is inside a geofence.

isEddystones

public boolean isEddystones()

Returns true if this application has Eddystone beacons enabled.

isIBeacons

public boolean isIBeacons()

Returns true if this application has iBeacons enabled.

isBluetoothTrilateration

public boolean isBluetoothTrilateration()

Returns true if this application uses advanced Bluetooth positioning.

isIndoorAtlas

public boolean isIndoorAtlas()

Returns true if this application has IndoorAtlas enabled.

isNativePositioning

public boolean isNativePositioning()

Returns true if this application has native positioning enabled.

getNativeAccuracy

public NativeAccuracy getNativeAccuracy()

Returns the accuracy level of the native positioning.

getIndoorAtlasApiKey

@Nullable public String getIndoorAtlasApiKey()

Returns the IndoorAtlas API Key of this application, if it has one.

getIndoorAtlasApiKeySecret

@Nullable public String getIndoorAtlasApiKeySecret()

Returns the IndoorAtlas API Key Secret of this application, if it has one.

getJSON

@Nullable public String getJSON()

Constructs JSON from this object. Returns null if internal parsing fails.

fromJSON

@Nullable public static ProximiioApplication fromJSON(String json)

Create a ProximiioApplication instance from JSON. Returns a new instance of ProximiioApplication if the JSON is valid, null otherwise.

ProximiioBLEDevice

Represents a device found by Bluetooth Low Energy scan.

This is a base class for BLE devices. The type of the device can be found by using ProximiioBLEDevice.getType. If the type is IBEACON, this class can be cast to ProximiioIBeacon. If the type is EDDYSTONE, this class can be cast to ProximiioEddystone.

Proximity

enum Proximity

Key Description
Proximity.UNKNOWN Unknown distance.
Proximity.IMMEDIATE The device is very close by.
Proximity.NEAR The device is near.
Proximity.FAR The device is far.

getMAC

public String getMAC()

Returns the MAC address of this beacon.

getDistance

@Nullable public Double getDistance()

Returns the estimated distance to this device in meters. This value is averaged over the last scan cycle. If no value is available, returns null.

getProximity

public Proximity getProximity()

This returns an estimate of the zone this device is in. This values is based on the accuracy level.

getRSSI

public int getRSSI()

The signal strength of this device. This is used with TxPower to determine accuracy.

getTxPower

@Nullable public Integer getTxPower()

Returns the preconfigured transmit power value of the device. This is used with RSSI to determine accuracy. Null if not available.

getInput

@Nullable public ProximiioInput getInput()

Returns the ProximiioInput linked to this device, if one is available, otherwise null. This means that the device matches the defined input.

getName

@Nullable public String getName()

Returns the name of this device.

getType

public ProximiioInput.InputType getType()

Returns the type of this device.

The following values are possible:

  • IBEACON
  • EDDYSTONE
  • GENERIC_BLE

Comparator

Collections.sort(devices, new ProximiioBLEDevice.Comparator());

This is a class that implements the java.util.Comparator interface, and determines order with distance. This class can be used to sort lists, for example.

ProximiioIBeacon

Represents a device found by Bluetooth Low Energy scan, that matches the iBeacon specification.

getUUID

public String getUUID()

The UUID of this device, as in iBeacon spec.

getMajor

public int getMajor()

The major value of this device.

getMinor

public int getMinor()

The minor value of this device.

ProximiioEddystone

Represents a device found by Bluetooth Low Energy scan, that matches the Eddystone specification.

getNamespace

@Nullable public String getNamespace()

The namespace of this device. Available if this device has the UID feature.

getInstanceID

@Nullable public String getInstanceID()

The instance ID of this device. Available if this device has the UID feature.

getBatteryVoltage

@Nullable public Integer getBatteryVoltage()

The battery voltage in mV. Available if this device has the TLM feature.

getTemperature

@Nullable public Float getTemperature()

The temperature measured by this device in Celsius. Available if this device has the TLM feature.

getUptime

@Nullable public Long getUptime()

The time since boot in milliseconds. Available if this device has the TLM feature.

getAdCount

@Nullable public Long getAdCount()

The advertising count of this device since boot. Available if this device has the TLM feature.

getURL

@Nullable public String getURL()

The URL of this device. Available if this device has the URL feature.

getEID

@Nullable public String getEID()

The EID of this device. Available if this device has the EID feature.

hasFeature

public boolean hasFeature(int feature)

Check what frame types this Eddystone has available. Returns true if one or more of the specified features are available. These will be updated as the device transmits more packets / frame types.

You can submit the following as the feature parameter (or combine them with the | operator):

  • ProximiioEddystone.FEATURE_UID
  • ProximiioEddystone.FEATURE_TLM
  • ProximiioEddystone.FEATURE_URL
  • ProximiioEddystone.FEATURE_EID

ProximiioPathfindingResult

Pathfinding result, representing a path with a list of type ProximiioPathfindingNode.

getPath

public ArrayList<ProximiioPathfindingNode> getPath()

Get the list of nodes this path is made of. First item in the list is the starting point and the last item is the end point. Some of the nodes are generated by the pathfinding algorithm, and don’t have IDs or neighbour IDs.

isFinished

public boolean isFinished(double lat, double lon, double radius, @Nullable String currentFloorID)

Check if you have reached the end of the path. Returns true if the provided location was closer or as far as the supplied radius from the end point of the path, and if the floor ID supplied was the same as the end point’s floor ID. Null floor ID only checks coordinates.

ProximiioPathfindingNode

Pathfinding node, a waypoint, intersection. These are used to represent data for pathfinding. See ProximiioPlace.getPath.

getLat

public double getLat()

This node’s latitude.

getLon

public double getLon()

This node’s longitude.

getID

public String getID()

This node’s ID.

getFloorID

public String getFloorID()

The ID of the floor this node belongs to.

getNeighbourIDs

public String[] getNeighbourIDs()

Get an array of neighbouring nodes’ IDs. These are the nodes that are reachable from this node.

getNeighbours

public ArrayList<ProximiioPathfindingNode> getNeighbours()

Get a list of resolved neighbors, as defined in neighbourIDs. Available after calling ProximiioPlace.getPath for the first time, provided that the place has a list of nodes that this node belongs to. Returns null if this node isn’t initialized by ProximiioPlace.getPath.

getDistance

public float getDistance(ProximiioPathfindingNode node)

Get the distance between two nodes in meters.

ProximiioGoogleMapHelper

private ProximiioMapHelper mapHelper;

@Override
public void onMapReady(GoogleMap googleMap) {
    mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap).build();

    googleMap.setOnMyLocationButtonClickListener(mapHelper);
    googleMap.setOnMapClickListener(mapHelper);
    googleMap.setOnCameraIdleListener(mapHelper);
    googleMap.setOnMarkerClickListener(mapHelper);
    googleMap.setOnCameraMoveStartedListener(mapHelper);
}

@Override
protected void onDestroy() {
    super.onDestroy();
    if (mapHelper != null) {
        mapHelper.destroy();
    }
}

With this, you can integrate Proximi.io with Google Maps easily. You can turn features on and off based on your needs.

Features include:

  • Positioning
  • Floor plan images
  • Markers for inputs and geofences
  • Positioning heat map
  • Pathfinding
  • Auto-rotation with magnetometer
  • Floor changing / multiple floor support

To get started, take a look at the ProximiioGoogleMapHelper.Builder.

All Builder methods are available in the ProximiioGoogleMapHelper object as getters and setters as well, so you can change your features and settings on the fly if you need to.

ClusterState

An enum representing the clustering mode of markers.

Key Description
ClusterState.NEVER_CLUSTER Never cluster markers together.
ClusterState.ALWAYS_CLUSTER Always use clustering where suitable.
ClusterState.USE_APPLICATION Cluster if the ProximiioApplication.isRemoteMode setting of the current application is true.

Listener

This can be used to receive callbacks on map events.

changedFloor

public void changedFloor(@Nullable ProximiioFloor floor)

Called when the displayed floor has changed. This is different from ProximiioListener.changedFloor, if Builder.floorID or ProximiioMapHelper.floorDown methods are used, for example.

pathfindingTo

public void pathfindingTo(double lat, double lon, @Nullable String floorID)

If pathfinding and positioning are enabled, request a path to be displayed to the specified location and floor.

floorUp

mapHelper.floorUp();

public void floorUp()

Go up one floor. Changes the visible floor to be one floor up from the current.

Floor ordering is guaranteed only if floor numbers (ProximiioFloor.getFloorNumber) are available.

floorDown

mapHelper.floorDown();

public void floorDown()

Go down one floor. Changes the visible floor to be one floor down from the current.

Floor ordering is guaranteed only if floor numbers (ProximiioFloor.getFloorNumber) are available.

destroy

@Override
protected void onDestroy() {
    super.onDestroy();
    if (mapHelper != null) {
        mapHelper.destroy();
    }
}

public void destroy()

Call this to clean up.

ProximiioGoogleMapHelper.Builder

public Builder(@NonNull Context context, @NonNull GoogleMap googleMap)

Use this to build a new ProximiioGoogleMapHelper.

Use the methods below to customize the map features. You can chain multiple method calls together before the final call to build.

positioning

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .positioning(true)
        .build();

public Builder positioning(boolean enabled)

Set the current position of the user automatically on the map, as position gets updated with ProximiioListener.position.

  • This is enabled by default.

pathfinding

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .pathfinding(true)
        .build();

public Builder pathfinding(boolean enabled)

Enable or disable pathfinding. A path will be calculated from the current position to the tapped spot on the map.

This requires that you have set up pathfinding for the displayed floor’s place, with the Proximi.io Management Application for example.

  • This is enabled by default.
  • This requires positioning.

autoRotateAndFollow

private ProximiioMapHelper mapHelper;

@Override
public void onMapReady(GoogleMap googleMap) {
    mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .autoRotateAndFollow(true)
        .build();

    googleMap.setOnMyLocationButtonClickListener(mapHelper);
    googleMap.setOnMapClickListener(mapHelper);
    googleMap.setOnCameraIdleListener(mapHelper);
    googleMap.setOnMarkerClickListener(mapHelper);
    googleMap.setOnCameraMoveStartedListener(mapHelper);
}

@Override
protected void onResume() {
    super.onResume();
    if (mapHelper != null) {
        mapHelper.onResume();
    }
}

@Override
protected void onPause() {
    super.onPause();
    if (mapHelper != null) {
        mapHelper.onPause();
    }
}

@Override
protected void onDestroy() {
    super.onDestroy();
    if (mapHelper != null) {
        mapHelper.destroy();
    }
}

public Builder autoRotateAndFollow(boolean enabled)

Set automatic rotation + following of the current position based on the device’s magnetic sensor. If a magnetic sensor is not available, rotation won’t be performed.

If you enable this, it’s necessary to call ProximiioGoogleMapHelper.onPause and ProximiioGoogleMapHelper.onResume to pause and resume the magnetic sensor to save battery.

  • This is disabled by default.
  • This requires positioning.

followPositioning

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .followPositioning(true)
        .build();

public Builder followPositioning(boolean enabled)

Enable or disable the map camera following the current position.

The map camera will stop following the current position if the map is moved around, and will continue following when the “My Location” -button is tapped.

This has no effect if Builder.autoRotateAndFollow is set to true, as it already follows the current position.

  • This is enabled by default.
  • This requires positioning.

floorID

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .floorID("yourFloorIDhere")
        .build();

public Builder floorID(@Nullable String floorID)

Set the floor for the map manually.

  • This is null by default (the current floor from ProximiioListener.changedFloor is used).

showFloorPlan

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .showFloorPlan(true)
        .build();

public Builder showFloorPlan(boolean show)

Show the floor plan of the current floor (from ProximiioListener.changedFloor), or the floor plan of the specified floor ID.

  • This is enabled by default.

showFloorIndicator

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .showFloorIndicator(true)
        .build();

public Builder showFloorIndicator(boolean show)

Show a floor indicator next to the current position, when the floor displayed is different from the actual current floor (but not in a different place).

For example, if the current floor (ProximiioListener.changedFloor) is floor number 2 and the floor visible is number 1, a small arrow up is displayed to indicate that the current position is above the visible floor. This is possible, for example, if Builder.floorID or ProximiioGoogleMapHelper.floorUp is used.

  • This is enabled by default.
  • This requires positioning.

showInputMarkers

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .showInputMarkers(true)
        .build();

public Builder showInputMarkers(boolean show)

Show markers of inputs on the map.

  • This is enabled by default.

showGeofenceMarkers

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .showGeofenceMarkers(true)
        .build();

public Builder showGeofenceMarkers(boolean show)

Show markers of geofences on the map. Radius of the geofence is indicated when the marker is tapped.

  • This is enabled by default.

showPositionHeatMap

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .showPositionHeatMap(true)
        .build();

public Builder showPositionHeatMap(boolean show)

Show a single-color position history heat map.

  • This is enabled by default.
  • This requires positioning.

heatMapEntries

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .heatMapEntries(10)
        .build();

public Builder heatMapEntries(int amount)

Set the maximum number of heat map entries.

  • This is 25 by default.
  • This requires position heat map.

pathWidth

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .pathWidth(10)
        .build();

public Builder pathWidth(int pixels)

Set the width of the pathfinding path in pixels.

  • This is 5 pixels by default.
  • This requires pathfinding.

pathEndDistance

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .pathEndDistance(5)
        .build();

public Builder pathEndDistance(double meters)

Set the distance from the path end point at which the path is completed and erased.

  • This is 2 meters by default.
  • This requires pathfinding.

initialPositioningZoom

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .initialPositioningZoom(20)
        .build();

public Builder initialPositioningZoom(float zoomLevel)

Set the initial zoom level of the map when using positioning. See Google’s documentation about zoom levels.

  • This is 19.5 by default.
  • This requires positioning.

clusterMarkers

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .clusterMarkers(ProximiioGoogleMapHelper.ClusterState.NEVER_CLUSTER)
        .build();

public Builder clusterMarkers(ClusterState clusterState)

Set the cluster mode of markers. See ProximiioGoogleMapHelper.ClusterState.

  • This is ClusterState.USE_APPLICATION by default.
  • This requires input and/or geofence markers.

includeMarkers

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .includeMarkers(new String[] { "firstMarkerID", "secondMarkerID" })
        .build();

public Builder includeMarkers(@Nullable String[] ids)

Set which inputs’ and geofences’ markers are displayed.

  • All markers are displayed by default.
  • This requires input and/or geofence markers.

excludeMarkers

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .excludeMarkers(new String[] { "firstMarkerID", "secondMarkerID" })
        .build();

public Builder excludeMarkers(@Nullable String[] ids)

Set which inputs’ and geofences’ markers are not displayed.

  • All markers are displayed by default.
  • This requires input and/or geofence markers.

pathColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .pathColor(Color.BLUE)
        .build();

public Builder pathColor(int argb)

Set the color of the pathfinding path, in ARGB hex (see the Color class).

  • This is Color.RED by default.
  • This requires pathfinding.

heatMapColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .heatMapColor(0x0B00FF00)
        .build();

public Builder heatMapColor(int argb)

Set the color of heat map entries, in ARGB hex (see the Color class).

  • This is 0x0D0000FF by default.
  • This requires position heat map.

inputMarkerColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .inputMarkerColor(BitmapDescriptorFactory.HUE_BLUE)
        .build();

public Builder inputMarkerColor(float hue)

Set the color of input markers, as a color hue (see BitmapDescriptorFactory for examples).

  • This is BitmapDescriptorFactory.HUE_BLUE by default.
  • This requires input markers.

geofenceMarkerColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .geofenceMarkerColor(BitmapDescriptorFactory.HUE_RED)
        .build();

public Builder geofenceMarkerColor(float hue)

Set the color of geofence markers, as a color hue (see BitmapDescriptorFactory for examples).

  • This is BitmapDescriptorFactory.HUE_RED by default.
  • This requires geofence markers.

inputMarkerAreaColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .inputMarkerAreaColor(0xFF0000FF)
        .build();

public Builder inputMarkerAreaColor(int argb)

Set the color for input area, in ARGB hex (see the Color class).

  • This is 0xFF0000FF by default.
  • This requires input markers.

geofenceMarkerAreaColor

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .geofenceMarkerAreaColor(0x10FF0000)
        .build();

public Builder geofenceMarkerAreaColor(int argb)

Set the color for geofence area, in ARGB hex (see the Color class).

  • This is 0x33FF0000 by default.
  • This requires geofence markers.

listener

mapHelper = new ProximiioGoogleMapHelper.Builder(this, googleMap)
        .listener(new ProximiioGoogleMapHelper.Listener() {
            @Override
            public void changedFloor(@Nullable ProximiioFloor floor) {
                // Floor changed
            }
        })
        .build();

public Builder listener(Listener listener)

Set the listener for map events.

See Listener.

build

public ProximiioGoogleMapHelper build()

Create a new ProximiioGoogleMapHelper object from this Builder. The new object will begin operation and add specified features to the map.