React Native Android Location Services Dialog Box Versions Save

React Native Android Location Services Dialog Box

v2.8.2

4 years ago

v2.8.1

5 years ago

v2.8.0

5 years ago

v2.7.0

5 years ago

Projects are now compiled using Android SDK 26

v2.6.0

5 years ago

Dialog box colors can now be changed.

LocationServicesDialogBox.checkLocationServicesIsEnabled({
   message: "<font color='#f1eb0a'>Use Location ?</font>",
   ok: "YES",
   cancel: "NO",
   style: {
       backgroundColor: '#87a9ea',
       positiveButtonTextColor: '#ffffff',
       positiveButtonBackgroundColor: '#5fba7d',
       negativeButtonTextColor: '#ffffff',
       negativeButtonBackgroundColor: '#ba5f5f'
   }
})

v2.5.1

5 years ago

v2.5.0

6 years ago

providerListener

providerListener: false, //true => Trigger "locationProviderStatusChange" listener when the location state changes

locationProviderStatusChange

import { DeviceEventEmitter } from 'react-native';

DeviceEventEmitter.addListener('locationProviderStatusChange', function(status) { // only trigger when "providerListener" is enabled
    console.log(status); //  status => {enabled: false, status: "disabled"} or {enabled: true, status: "enabled"}
});

stopListener

componentWillUnmount() {
    LocationServicesDialogBox.stopListener(); // Stop the "locationProviderStatusChange" listener
}

v2.4.3

6 years ago

v2.4.2

6 years ago

"preventOutSideTouch" and "preventBackClick"

preventOutSideTouch: false, //true => To prevent the location services window from closing when it is clicked outside.

preventBackClick: false //true => To prevent the location services popup from closing when it is clicked back button.

v2.3.2

6 years ago