{"action":"created","issue":{"url":"https://api.github.com/repos/evothings/cordova-ble/issues/103","repository_url":"https://api.github.com/repos/evothings/cordova-ble","labels_url":"https://api.github.com/repos/evothings/cordova-ble/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/evothings/cordova-ble/issues/103/comments","events_url":"https://api.github.com/repos/evothings/cordova-ble/issues/103/events","html_url":"https://github.com/evothings/cordova-ble/issues/103","id":163406542,"number":103,"title":"On Android 5 (L), app crashes when bluetooth is disabled","user":{"login":"qpwr","id":3735390,"avatar_url":"https://avatars.githubusercontent.com/u/3735390?v=3","gravatar_id":"","url":"https://api.github.com/users/qpwr","html_url":"https://github.com/qpwr","followers_url":"https://api.github.com/users/qpwr/followers","following_url":"https://api.github.com/users/qpwr/following{/other_user}","gists_url":"https://api.github.com/users/qpwr/gists{/gist_id}","starred_url":"https://api.github.com/users/qpwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qpwr/subscriptions","organizations_url":"https://api.github.com/users/qpwr/orgs","repos_url":"https://api.github.com/users/qpwr/repos","events_url":"https://api.github.com/users/qpwr/events{/privacy}","received_events_url":"https://api.github.com/users/qpwr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mikaelkindborg","id":187471,"avatar_url":"https://avatars.githubusercontent.com/u/187471?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelkindborg","html_url":"https://github.com/mikaelkindborg","followers_url":"https://api.github.com/users/mikaelkindborg/followers","following_url":"https://api.github.com/users/mikaelkindborg/following{/other_user}","gists_url":"https://api.github.com/users/mikaelkindborg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelkindborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelkindborg/subscriptions","organizations_url":"https://api.github.com/users/mikaelkindborg/orgs","repos_url":"https://api.github.com/users/mikaelkindborg/repos","events_url":"https://api.github.com/users/mikaelkindborg/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelkindborg/received_events","type":"User","site_admin":false},"assignees":[{"login":"mikaelkindborg","id":187471,"avatar_url":"https://avatars.githubusercontent.com/u/187471?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelkindborg","html_url":"https://github.com/mikaelkindborg","followers_url":"https://api.github.com/users/mikaelkindborg/followers","following_url":"https://api.github.com/users/mikaelkindborg/following{/other_user}","gists_url":"https://api.github.com/users/mikaelkindborg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelkindborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelkindborg/subscriptions","organizations_url":"https://api.github.com/users/mikaelkindborg/orgs","repos_url":"https://api.github.com/users/mikaelkindborg/repos","events_url":"https://api.github.com/users/mikaelkindborg/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelkindborg/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-07-01T14:24:44Z","updated_at":"2016-07-04T20:38:45Z","closed_at":null,"body":"Hey Mikael,\r\n\r\nIf the app is started, a dialog pops up to tell the user that the app wants to enable bluetooth and asks whether they want to allow it. When you click yes, the same dialog is shown again and when you press yes again, the app crashes. Bluetooth is enabled correctly though and if you start the app again, it will just work because Bluetooth is enabled then.\r\n\r\nCan you confirm this issue?\r\n\r\nThanks for all your work.\r\n\r\nMarc"},"comment":{"url":"https://api.github.com/repos/evothings/cordova-ble/issues/comments/230351713","html_url":"https://github.com/evothings/cordova-ble/issues/103#issuecomment-230351713","issue_url":"https://api.github.com/repos/evothings/cordova-ble/issues/103","id":230351713,"user":{"login":"qpwr","id":3735390,"avatar_url":"https://avatars.githubusercontent.com/u/3735390?v=3","gravatar_id":"","url":"https://api.github.com/users/qpwr","html_url":"https://github.com/qpwr","followers_url":"https://api.github.com/users/qpwr/followers","following_url":"https://api.github.com/users/qpwr/following{/other_user}","gists_url":"https://api.github.com/users/qpwr/gists{/gist_id}","starred_url":"https://api.github.com/users/qpwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qpwr/subscriptions","organizations_url":"https://api.github.com/users/qpwr/orgs","repos_url":"https://api.github.com/users/qpwr/repos","events_url":"https://api.github.com/users/qpwr/events{/privacy}","received_events_url":"https://api.github.com/users/qpwr/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T20:38:45Z","updated_at":"2016-07-04T20:38:45Z","body":"@mikaelkindborg, as far as I can see, this should be the output. I waited for the dialog to appear and then confirmed it. This is what followed:\r\n\r\n````\r\nE/bt_gap_api.c( 1375): [GAP] btmtk_paired_dev_cache_init open error 2: No such file or directory\r\nE/RequestPermissionActivity( 7824): Unexpected onActivityResult 5 0\r\nE/AndroidRuntime(16219): FATAL EXCEPTION: main\r\nE/AndroidRuntime(16219): Process: com.trademarc.smartrace, PID: 16219\r\nE/AndroidRuntime(16219): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=0, data=null} to activity {com.trademarc.smartrace/com.trademarc.smartrace.MainActivity}: java.lang.NullPointerException\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:3604)\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread.handleSendResult(ActivityThread.java:3647)\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread.access$1400(ActivityThread.java:151)\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)\r\nE/AndroidRuntime(16219): \tat android.os.Handler.dispatchMessage(Handler.java:110)\r\nE/AndroidRuntime(16219): \tat android.os.Looper.loop(Looper.java:193)\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread.main(ActivityThread.java:5345)\r\nE/AndroidRuntime(16219): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime(16219): \tat java.lang.reflect.Method.invoke(Method.java:515)\r\nE/AndroidRuntime(16219): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)\r\nE/AndroidRuntime(16219): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)\r\nE/AndroidRuntime(16219): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime(16219): Caused by: java.lang.NullPointerException\r\nE/AndroidRuntime(16219): \tat com.evothings.BLE.onActivityResult(BLE.java:199)\r\nE/AndroidRuntime(16219): \tat org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:151)\r\nE/AndroidRuntime(16219): \tat org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:348)\r\nE/AndroidRuntime(16219): \tat android.app.Activity.dispatchActivityResult(Activity.java:5535)\r\nE/AndroidRuntime(16219): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:3600)\r\nE/AndroidRuntime(16219): \t... 11 more\r\nE/BTIF_GATT_CLIENT( 1375): [GATT][ERR] initGattcSock#1732 : bind socket failed : Invalid argument, errno=22\r\nE/AudioService(  662): handleConfigurationChanged() createInstance IAudioServiceExt fail\r\nE/bt_gap_api.c( 1375): [GAP]read error(0 bytes read) 11: Try again\r\nE/BluetoothServiceJni( 1375): SOCK FLAG = 1 ***********************\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/BluetoothServiceJni( 1375): SOCK FLAG = 1 ***********************\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61460][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61460][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/BluetoothReceiver(  962): [MMI][BluetoothReceiver.startService][start service [com.mediatek.bluetooth.AdvancedService]\r\nE/BluetoothServiceJni( 1375): SOCK FLAG = 0 ***********************\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61460][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61462][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/MTKBT   ( 1375): [Session]the session[61458][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61460][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]the session[61462][1375] is not ready to monitor\r\nE/MTKBT   ( 1375): [Session]no any more session is in list\r\nE/        (  733): appName=com.android.systemui, acAppName=/system/bin/surfaceflinger\r\nE/        (  733): 0\r\nE/        (  733): appName=com.android.systemui, acAppName=/system/bin/surfaceflinger\r\nE/        (  733): 0\r\n````"}}
{"actor":{"display_login":"qpwr"}}