BLE Hubs 1.0Think SignalR for BLE!Think SignalR for BLE!Hub it up!
UniHub 1.0Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?YES PLEASE!
Region Geofencing
The region geofencing bridge monitors region sets with background GPS, with no OS limit on how many regions: which
state or province the device is in, which delivery zone, which store it is near. It’s backed by
Shiny.Geofencing.Regions. Each set tracks the one region the device is in, and
entering or leaving one reaches the page as regiongeofence.change while it is open and background.js otherwise.
The sets are registered in C#. The page starts and stops monitoring and reads where the device is, but never defines
what is monitored.
Android, iOS and Mac Catalyst. Everywhere else every route answers 501.
Document sets need Shiny.Geofencing.Regions.DocumentDb and a SQLite document store you register, with each region
type’s geometry mapped (cfg.MapSpatialProperty). It also carries US states, Canadian provinces and their cities:
Don’t also call AddRegionGeofencing — the bridge registers it, with WebAppRegionGeofenceDelegate as the delegate.
To handle changes in C# as well, subclass that delegate, call the base OnRegionChanged, and pass
o => o.UseDelegate<MyDelegate>().
consthere=await regions.getCurrent(); // one entry per set, from the last GPS reading
Moving straight from one region to another in the same set raises the exit first, then the entry. start answers 409
(geofence_refused) without background location. stop forgets which regions the device was in, so the next start
enters them again.
Each change and each current entry carries region: a geocoder set’s placemark, or the region object written through
RegionSerializerOptions — usually the document store’s own JsonSerializerOptions. A type with no metadata there is
left out (null) rather than reflected over, and so is an exit from a region the source can no longer describe.
Monitoring runs Shiny.Gps’ one listener. The GPS bridge drives that same listener, so a page
that stops it through /_bridge/gps/listener stops region geofencing too.
The region object — a document, or the placemark of a geocoder set. Null when its type has no JSON metadata in the bridge's serializer options, or for an exit the source can no longer describe.
The region object — a document, or the placemark of a geocoder set. Null when its type has no JSON metadata in the bridge's serializer options, or for an exit the source can no longer describe.