ReactNative OneSignal Android failed to compile RNOneSignal.java because bunch of unhandled JSONException

If you compile ReactNative Android OneSignal plugin and hit the unhandled
JSONException that thrown or triggered by 
callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject()));

Simply add this:
-- callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject()));

++ try {
++     callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject()));
++ }
++ catch (JSONException je ) {
++     je.printStackTrace();
++     return;
++ }

Hope it help ^^

Comments

Popular posts from this blog

Arduino RFID, RC522, VUSB HID as Keyboard

CakePHP Captcha component with Securimage

Codeigniter Oracle Transaction BUG