Closed auricgoldfinger closed 3 years ago
So I did some research and due to the async character of the events, you just can't be sure. There were more checks for null on the m_service so it seems to be the best way to solve it anyway. Since pull request #4 isn't merged yet, I pushed it into that one 😃
I still don't know how to reproduce it and I'm still trying to find a solution for it, but sometimes I get a stacktrace in a Toast message:
https://github.com/ykasidit/bluetooth_gnss/blob/391f2fb1c9a5dc95ba0ab8be0ec055fbb90146ae/android/app/src/main/java/com/clearevo/bluetooth_gnss/MainActivity.java#L180
The code could be changed with
result.success(m_service != null && m_service.is_ntrip_connected());
but I'm trying to find out what causesm_service
to be null...Work around: close the app, swipe it away and reopen 😃