This modernizes the reference app to work properly with Android O+ on background detections.
While the Android Beacon Library has always supported the latest Android versions for background detections, this reference app has not always been updated to demonstrate the library behaviors in the newest Android versions. This change corrects that in two ways:
It uses Notification Channels properly so that notifications appear on devices with Android O and higher.
It no longer tires to auto-launch an activity from the background on first-time beacon detection as this is no longer possible as of Android O.
The new background behavior is that it will send a notification whenever we enter the beacon region. Tapping on that notification will launch the app UI.
If you wan to test a fast detection in the background, try this:
Run this app.
Turn on a beacon so you get a region entry
Turn off a beacon and wait to get a region exit
Kill the app
Turn on the beacon, and watch for a quick notification!
This modernizes the reference app to work properly with Android O+ on background detections.
While the Android Beacon Library has always supported the latest Android versions for background detections, this reference app has not always been updated to demonstrate the library behaviors in the newest Android versions. This change corrects that in two ways:
The new background behavior is that it will send a notification whenever we enter the beacon region. Tapping on that notification will launch the app UI.
If you wan to test a fast detection in the background, try this: