Reputation: 2296
I have an access system based on BLE controllers and a cloud service. We're going to implement the "hands-free" mode for getting access to the restricted area. It means:
My thoughts:
Plan 'A' is using a combination of
Plan 'B' is using the white-list apps of Android to prevent battery optimisation in the Doze mode.
Upvotes: -1
Views: 190
Reputation: 18497
You don't need the app to stay alive if you just want to perform a background BLE scan. Just use the PendingIntent BLE scan feature https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner#startScan(java.util.List%3Candroid.bluetooth.le.ScanFilter%3E,%20android.bluetooth.le.ScanSettings,%20android.app.PendingIntent). Then your app process will be started when an advertisement packet matching your filter arrives.
Upvotes: 0