Once the PjSip Service has been started if at any time after that point the app is closed from the Recent Apps screen then a Null Pointer Exception occurs in the PjSipService.onStartCommand method, Line 240.
From logcat:
10-17 13:28:51.456 5903 5903 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.carusto.ReactNativePjSip.PjSipService@ced8a84 with null: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4079) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.access$2400(ActivityThread.java:221) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1897) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.carusto.ReactNativePjSip.PjSipService.onStartCommand(PjSipService.java:240) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4062) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: ... 8 more
Once the PjSip Service has been started if at any time after that point the app is closed from the Recent Apps screen then a Null Pointer Exception occurs in the PjSipService.onStartCommand method, Line 240. From logcat:
10-17 13:28:51.456 5903 5903 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.carusto.ReactNativePjSip.PjSipService@ced8a84 with null: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4079) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.access$2400(ActivityThread.java:221) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1897) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at com.carusto.ReactNativePjSip.PjSipService.onStartCommand(PjSipService.java:240) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4062) 10-17 13:28:51.456 5903 5903 E AndroidRuntime: ... 8 more