mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
feat(native): the Android app's widgets, location, tile store, Play Billing and Google Wallet
The UI now turns these on by feature on Android as well as iOS: - widgets, widgetTrips and the travel day (liveActivity) write the same snapshot to the Android app's Glance widgets; the travel day also sends the next stop's minutes and the stops' colours for the Live Update. - geolocation answers navigator.geolocation from the app's location stream. - tileCache: Android keeps Mapbox's resources in its WebView client, so the map is offline-capable there too, without the iOS trek-tile:// rewrite. - playBilling: the purchase client buys through Google Play on Android, with the purchase token as the receipt the control plane verifies. - googleWallet: a booking's button adds it to Google Wallet on Android, through the save link the server asks the TREK services for.
This commit is contained in:
@@ -9,6 +9,10 @@ export function isNativeIos(): boolean {
|
||||
return isNativeApp() && Capacitor.getPlatform() === 'ios';
|
||||
}
|
||||
|
||||
export function isNativeAndroid(): boolean {
|
||||
return isNativeApp() && Capacitor.getPlatform() === 'android';
|
||||
}
|
||||
|
||||
/** The server the app is connected to: the WebView sits on its origin. */
|
||||
export function nativeServerHost(): string | null {
|
||||
return isNativeApp() ? window.location.host : null;
|
||||
|
||||
Reference in New Issue
Block a user