Well, obviously we must not ignore connection state changes even if they
come with an error code.
Unfortunately the API docs are a bit terse in that respect.
- close() the gatt instance when explicitly disconnecting
- create a new gatt instance when explicitly connecting
Unfortunately I still appear to get spontaneous disconnects after some
notifications.
Otherwise the result handler might be called before the wait-latch
has been created, leading to a deadlock of the thread.
Also: only wait for read- and write actions, but not for wait-actions.
For a start, use android-logger as backend. Needs a better configuration
but no time right now.
For file-logging we will use logback as slf4j-implementation.
1) The MAC address has to be added manually for now (Settings -> Debug)
2) Configure other notifications as desired
3) After doing that, restart Gadgetbridge, after that, the device should
be visible.
4) Tap it to connect
5) Try the Debug activity via the Menu to send some dummy notifications
=> Your MI should vibrate and blink
Also: add some extra files necessary to support Eclipse ADT. To be
migrated to Andmore, later.