Open RoProducts opened 6 years ago
Is your application running in the background?
This is done in an Android service, which runs on the UI thread.
I changed the order of the api calls. I do now connect first and subscribe then. The crash did not reappear this way.
Hi,
I'm using neatle to connect one or more BLE cycling sensors in an Android app. These are long lasting connections and I'm setting the keepAlive flag in a ConnectionMonitor. Occasionally, after some time I'm getting the following exception during the connection :
java.lang.IllegalStateException at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902) at java.lang.reflect.Method.invoke(Method.java:372) at java.lang.reflect.Method.invoke(Native Method) at android.app.ActivityThread.main(ActivityThread.java:5254) at android.os.Looper.loop(Looper.java:135) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Handler.handleCallback(Handler.java:739) at si.inova.neatle.Device$6.run(Device.java:480) at si.inova.neatle.operation.CharacteristicSubscriptionImpl$1.onConnectionStateChanged(CharacteristicSubscriptionImpl.java:56) at si.inova.neatle.operation.CharacteristicSubscriptionImpl.access$000(CharacteristicSubscriptionImpl.java:39) at si.inova.neatle.operation.CharacteristicSubscriptionImpl.subscribeOnDevice(CharacteristicSubscriptionImpl.java:130) at si.inova.neatle.operation.OperationImpl.execute(OperationImpl.java:97) at si.inova.neatle.Device.execute(Device.java:220) at si.inova.neatle.Device.connect(Device.java:388)
I'm doing the following to connect a device (here for a csc sensor) :
What am I doing wrong here ? Can you help me ?
Thank you
Robert