Causing app foreground service to crash, partial stack:
Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.ninty.system.setting.SystemSetting$4@f8b3066
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1430)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1564)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664)
at com.ninty.system.setting.SystemSetting.onHostDestroy(SystemSetting.java:558)
at com.facebook.react.bridge.ReactContext.onHostDestroy(ReactContext.java:254)
Looks like there might be a typo here:
if (locationModeBR != null) {
mContext.unregisterReceiver(locationModeBR);
locationBR = null;
}
Causing app foreground service to crash, partial stack:
Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.ninty.system.setting.SystemSetting$4@f8b3066 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1430) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1564) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664) at com.ninty.system.setting.SystemSetting.onHostDestroy(SystemSetting.java:558) at com.facebook.react.bridge.ReactContext.onHostDestroy(ReactContext.java:254)
Looks like there might be a typo here:
Also was going to put trycatch around the unregisters. Here is the pr -> https://github.com/c19354837/react-native-system-setting/pull/124