React Native location services

Setting up geolocation regions and location-based messaging in Leanplum.

For React Native, depending on device type where we want to install the SDK, you will need to follow the instructions from iOS or Android section

For the ability to disable location collection or to manually set the user location, see the below.

Disabling location collection

If you do not want to send GPS/Cell location to Leanplum, then do not include either of the location frameworks above. Alternatively, you can include the frameworks and call disableLocationCollection before start.


Manually set user location

Our SDK allows you to set user location by calling setDeviceLocationWithLatitude after start. You should call disableLocationCollection before setting the user location.

Leanplum.setDeviceLocationWithLatitude(LATITUDE, LONGITUDE, ACCURACY_TYPE )
// ACCURACY_TYPE is enumerator with possible values: IP = 0, CELL = 1, GPS = 2