I am trying to create a basic app in which I create a regionBootstrap for background monitoring of various types of beacons, just like in the reference app.
However, instead of bringing the app to the foreground upon entering a beacon region, I would like to simply display a 'You have entered a beacon region' local notification.
I presume this would need to be coded in the onCreate method within the 'extends Application implements BootStrapNotifier' class. But I also see that the intent for starting the main activity is instantiated within the didEnterRegion method, so is this in fact where I'd need to code the notification?
The easiest way to trigger a background notification is to make a custom
Application
class that implementsBootstrapNotifier
. You then put the notification code in thedidEnterRegion
callback method like so:You can see a full example of this in the reference application for the Android Beacon Library.