Location tracking

Info
Send Ocamba location updates and trigger events such as push notifications when an install enters the location region.

Ocamba requires location permission.


You can use location tracking in two ways:


  1. Location update from app

    Location updates can be configured based on the specific use case of your app.

    It’s important to take into consideration the accuracy of the location, as well as, battery usage.

    All the set up information can be found in the Android developer guide.


    Once the location updates are set from the OS, you can send them to Ocamba:


    OcambaHoood.trackLocation(location);
    

  1. Location update from Ocamba SDK

    Ocamba SDK can do location tracking for you.

    Location tracking is used only when the app is active and forwards latitude and longitude information for every minute you spent in the app.

    Location permission is required for this feature to work.
    Keep in mind that location tracking is disabled by default.

    To enable this feature, simply modify your Ocamba init as follows:


    OcambaHoood.trackLocation().init();    
    

NOTE: required permissions: android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_BACKGROUND_LOCATION android.permission.ACCESS_COARSE_LOCATION

On This Page