0

As per the current Google nearBy documentation, for background BLE subscription "low-power scans are triggered only at screen-on events, even when your app is not currently active." https://developers.google.com/nearby/messages/android/get-beacon-messages#subscribe_in_the_background

The application i was designing needed to notify the user even when the screen is Off. Is there anyway to get the callback irrespective of this screen-on trigger using the NearBy API approach.

  • Why not use your app to trigger the notification? – Avinash Gupta May 22 '17 at 13:02
  • You can trigger a notification once you get the callback from NearBy API, which is limited to only screen-on events when app is in the background. – AndroidUser May 23 '17 at 15:51
  • Hey @AndroidUser, was wondering if you found a solution for your requirement of scanning for BLE devices in the background and waking up the application. thanks ! – Thiago Saraiva Oct 25 '19 at 16:03

1 Answers1

0

Sorry, we don't support this for power reasons. You can implement this using the lower level BluetoothLeScanner API and a background service, but you may be subject to other restrictions on newer versions of Android.

Brian Duff
  • 406
  • 3
  • 12
  • Is that any plans of supporting BLE scanning callback at the android framework level similar to iOS iBeacon ranging ? – AndroidUser Jul 07 '17 at 13:30