The plugin seems to work fine on Simulator but on device it crashed the app when I click OK. It was on development mode. I manage to get this error messages.
FATAL EXCEPTION: mqt_native_modules
Process: com.smish, PID: 2775
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.LOCATION_SOURCE_SETTINGS VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1878)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1545)
at android.app.Activity.startActivityForResult(Activity.java:4283)
at android.app.Activity.startActivityForResult(Activity.java:4230)
at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule$2.onClick(LocationServicesDialogBoxModule.java:63)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:173)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:818)
android.view.WindowLeaked: Activity com.smish.MainActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{5171d50 V.E...... R......D 0,0-1010,503} that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:565)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:326)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.app.Dialog.show(Dialog.java:350)
at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.displayPromptForEnablingGPS(LocationServicesDialogBoxModule.java:74)
at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.checkLocationService(LocationServicesDialogBoxModule.java:48)
at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.checkLocationServicesIsEnabled(LocationServicesDialogBoxModule.java:36)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:318)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:818)
The plugin seems to work fine on Simulator but on device it crashed the app when I click OK. It was on development mode. I manage to get this error messages.