Skip to content

Commit dcabe5f

Browse files
committed
event bug fix
1 parent c976db2 commit dcabe5f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ public class LocationServicesDialogBoxModule extends ReactContextBaseJavaModule
1515

1616
public LocationServicesDialogBoxModule(ReactApplicationContext reactContext) {
1717
super(reactContext);
18-
}
18+
reactContext.addActivityEventListener(this);
1919

20-
@Override
21-
public void onActivityResult(int requestCode, int resultCode, Intent data) {
22-
checkLocationService(true);
2320
}
2421

2522
@Override
@@ -70,4 +67,9 @@ public void onClick(DialogInterface dialogInterface, int id) {
7067
});
7168
builder.create().show();
7269
}
70+
71+
@Override
72+
public void onActivityResult(int requestCode, int resultCode, Intent data) {
73+
checkLocationService(true);
74+
}
7375
}

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import { NativeModules } from 'react-native';
2-
module.exports = NativeModules.LocationServicesDialogBox;
2+
export default NativeModules.LocationServicesDialogBox;

0 commit comments

Comments
 (0)