mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Fix BLE contact add failure
This commit is contained in:
@@ -1358,6 +1358,22 @@ class ConnectionProvider with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> importContactAdvert(Uint8List contactAdvertFrame) async {
|
||||
if (!_activeService.isConnected) {
|
||||
_error = 'Not connected to device';
|
||||
notifyListeners();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
_error = null;
|
||||
await _activeService.importContact(contactAdvertFrame);
|
||||
} catch (e) {
|
||||
_error = 'Failed to import contact: $e';
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
/// Send text message to contact
|
||||
///
|
||||
/// Returns true if the message was successfully sent to the BLE service.
|
||||
|
||||
Reference in New Issue
Block a user