This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to use the NRF beacon app as a background service

Hi, I have loaded the NRF beacon app and it's wonderful that it has a tasker integration. I need to push simple REST commands on discovery of NRF51822 beacons by this NRF beacon app. The problem is that once the service is pushed out from the main screen, it does not recognize the beacon. How do I make the NRF beacon app run in the background?

Vishal

Parents
  • In the Beacon service app you can switch background on and off and it works as a API for the beacon app towards BLE on Android. You can modify the beacon app which you have the source code for and have it running as a background passive scanner. In the onPause() routine of MainActivity it is by default set to stop monitoring for region and stop ranging. Ranging part of beacon is not supported by Android, but monitoring for region is. So you would have to keep the monitoring for region alive while in onPause by not stopping it and not unbind the service.

  • Hi Many thanks :) Just one more tiny step...the beacon app gives four actions to trigger event based on range (in range, out of range, near and above). However one can trigger and event only with one range. How do we get to select trigger for all ranges? If it is' in range' trigger this event, if it is 'out of range' trigger that event etc.

Reply Children
No Data
Related