Skip to content

Commit 90b8ae5

Browse files
authored
Update README.md
1 parent 14a4e67 commit 90b8ae5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ LocationServicesDialogBox.checkLocationServicesIsEnabled({
8282
});
8383

8484
BackHandler.addEventListener('hardwareBackPress', () => { //(optional) you can use it if you need it
85+
//do not use this method if you are using navigation."preventBackClick: false" is already doing the same thing.
8586
LocationServicesDialogBox.forceCloseDialog();
8687
});
8788

@@ -134,10 +135,6 @@ export default class LocationServiceTestPage extends Component {
134135

135136
this.checkIsLocation().catch(error => error);
136137

137-
BackHandler.addEventListener('hardwareBackPress', () => { //(optional) you can use it if you need it
138-
LocationServicesDialogBox.forceCloseDialog();
139-
});
140-
141138
DeviceEventEmitter.addListener('locationProviderStatusChange', function(status) { // only trigger when "providerListener" is enabled
142139
console.log(status); // status => {enabled: false, status: "disabled"} or {enabled: true, status: "enabled"}
143140
});
@@ -206,10 +203,6 @@ class SampleApp extends Component {
206203
console.log(error.message);
207204
});
208205

209-
BackHandler.addEventListener('hardwareBackPress', () => { //(optional) you can use it if you need it
210-
LocationServicesDialogBox.forceCloseDialog();
211-
});
212-
213206
DeviceEventEmitter.addListener('locationProviderStatusChange', function(status) { // only trigger when "providerListener" is enabled
214207
console.log(status); // status => {enabled: false, status: "disabled"} or {enabled: true, status: "enabled"}
215208
});

0 commit comments

Comments
 (0)