react-native-ble-manager
react-native-ble-manager copied to clipboard
Problem with writing characteristics on background mode
Version
- react-native-ble-manager v7.1.4
- react-native v0.63.2
- Android v.10
Expected behaviour
Writing data into the characteristic, in the background mode
BleManager.write(id, service, characteristic, data);
Actual behaviour
Nothing happens, not even an error
Steps to reproduce
- Connect to the device.
- Check that everything works in the active mode.
- Changes take place every 5 seconds
- Send the application to the background mode (background-timer is started for recording every 5 seconds).
- Data is sent to the record, but nothing changes.
AndroidManifest:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
PermissionsAndroid check
PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION) - true
PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.ACCESS_BACKGROUND_LOCATION) - true
Question
What am I doing wrong? How do I send the write in the background correctly?
On iOS works perfectly
@Looveh did you get it working ? If so, can you tell me ?