Skip to content

Commit 64117a7

Browse files
committed
Also start the listener when the result was inactive
1 parent 3a1f48a commit 64117a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/src/main/java/com/showlocationservicesdialogbox/LocationServicesDialogBoxModule.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ private void checkLocationService(Boolean activityResult) {
7575
if (!isEnabled) {
7676
if (activityResult || map.hasKey("openLocationServices") && !map.getBoolean("openLocationServices")) {
7777
promiseCallback.reject(new Throwable("disabled"));
78+
if (map.hasKey("providerListener") && map.getBoolean("providerListener")) {
79+
startListener();
80+
}
7881
} else if (!map.hasKey("showDialog") || map.getBoolean("showDialog")) {
7982
displayPromptForEnablingGPS(currentActivity, map, promiseCallback);
8083
} else {

0 commit comments

Comments
 (0)