File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ LocationServicesDialogBox.checkLocationServicesIsEnabled({
8282});
8383
8484BackHandler .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 });
You can’t perform that action at this time.
0 commit comments