kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Possible fix #26. It seems some phones don't quite have the services
list populated at the time they say service discovery has completed. Make the nasty 500ms delay a 1000ms delay insteadpull/40/head
rodzic
774ab65ece
commit
4efd25d009
|
@ -433,7 +433,7 @@ class RadioInterfaceService : Service(), Logging {
|
||||||
serviceScope.handledLaunch {
|
serviceScope.handledLaunch {
|
||||||
try {
|
try {
|
||||||
debug("Discovered services!")
|
debug("Discovered services!")
|
||||||
delay(500) // android BLE is buggy and needs a 500ms sleep before calling getChracteristic, or you might get back null
|
delay(1000) // android BLE is buggy and needs a 500ms sleep before calling getChracteristic, or you might get back null
|
||||||
|
|
||||||
// service could be null, test this by throwing BLEException and testing it on my machine
|
// service could be null, test this by throwing BLEException and testing it on my machine
|
||||||
// isOldApi = service.getCharacteristic(BTM_RADIO_CHARACTER) != null
|
// isOldApi = service.getCharacteristic(BTM_RADIO_CHARACTER) != null
|
||||||
|
|
Ładowanie…
Reference in New Issue