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!
GPS & Motion
The GPS bridge gives the page permissions, the current and last position, and a listener whose readings arrive as gps.reading events and at background.js. The motion bridge, in the same package, reports walking, running, cycling, driving or stationary, and the geocoding bridge turns a position into an address. Both are backed by Shiny.Gps.
GPS works on Android, iOS, Mac Catalyst and Windows; motion activity on Android, iOS and Mac Catalyst. Everywhere else they answer 501. For the page’s own position, navigator.geolocation with AllowWebPermissions(WebAppWebPermissions.Geolocation) works on every head except Linux, and needs no bridge — see Hosting.
Walking, running, cycling, driving or stationary, from the OS’s activity recognition.
There’s no history, only the latest reading and live ones. It ships in Shiny.AppDeviceBridge.Gps, but AddGpsBridge() doesn’t include it,
because it needs its own setup: NSMotionUsageDescription on iOS (the permission request crashes without it),
and ACTIVITY_RECOGNITION with Google Play Services on Android. Other platforms return 501.
GPS and motion listeners keep running without a page, because background.js receives their readings too — see Native Calls & Background.
The addresses at a position, from the platform geocoder: MapKit / CoreLocation on iOS and Mac Catalyst, and
android.location.Geocoder on Android. Windows, Linux, macOS and Android devices without a geocoding backend (typically
no Google Play services) use OpenStreetMap’s Nominatim instead, so it works on every platform. It needs network access but
no location permission, which is why AddGpsBridge() doesn’t include it: add AddGeocodingBridge() when you want it.
The public Nominatim server allows one request a second and asks for a User-Agent that identifies your app; it defaults to
your entry assembly’s name and version. To use your own server, or another User-Agent, register the geocoder first, and
the bridge keeps it:
GPS: permission, the last and current position, and a listener whose readings arrive as events. Android, iOS, Mac Catalyst and Windows; elsewhere every call fails with 501.
Starts listening; readings arrive through onReading, and in the background to the web app's gps handler. Fails with 409 without permission or while another listener runs.
Motion activity: walking, running, cycling, driving or stationary, as the OS's activity recognition reports it. Android, iOS and Mac Catalyst; elsewhere every call fails with 501. There is no history, only the latest reading and live ones.
Reverse geocoding: the addresses at a position, from the platform geocoder (MapKit / CoreLocation on iOS and Mac Catalyst, android.location.Geocoder on Android) or, on Windows, Linux, macOS and Android devices without a geocoding backend, OpenStreetMap's Nominatim. It needs network access but no location permission.
The placemarks at a position, most relevant first — empty when the geocoder found nothing. Fails with 400 for a position off the map and 503 when the platform geocoder could not answer (typically no network).