Beacons - Monitoring
Beacon Monitoring allows you to scan for a region of beacons while your app is in the background.
Setup
Background Delegate
using Shiny.Beacons;
namespace Sample.Beacons;
public partial class MyBeaconMonitorDelegate : IBeaconMonitorDelegate
{
// works with dependency injection if you need it
public async Task OnStatusChanged(BeaconRegionState newStatus, BeaconRegion region)
{
}
}
#if ANDROID
// this allows you to customize the foreground service notification
public partial class MyBeaconMonitorDelegate : IAndroidForegroundServiceDelegate
{
public void Configure(AndroidX.Core.App.NotificationCompat.Builder builder)
{
}
}
#endif