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:
Maurice
2026-11-07 14:11:59 +01:00
parent d41a4f0827
commit 3beb5c4223
41 changed files with 404 additions and 60 deletions
+1
View File
@@ -300,6 +300,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'يتطلب هذا اتصالاً. حاول مرة أخرى عندما يعود TREK للاتصال.',
'reservations.exportCsvFiltered': 'تصدير الصفوف المعروضة ({shown} من {total}) (CSV)',
'reservations.wallet.add': 'إضافة إلى Apple Wallet',
'reservations.wallet.addGoogle': 'إضافة إلى Google Wallet',
'reservations.wallet.failed': 'تعذّر إنشاء بطاقة Wallet. حاول مرة أخرى.',
'reservations.wallet.undated': 'حدّد تاريخًا للحجز أولًا: يعرض Wallet البطاقة قرب موعده.',
};
+1
View File
@@ -308,6 +308,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Bunun üçün bağlantı lazımdır. TREK yenidən onlayn olduqda bir daha cəhd edin.',
'reservations.exportCsvFiltered': 'Göstərilən {shown}/{total} sətri ixrac et (CSV)',
'reservations.wallet.add': 'Apple Wallet-ə əlavə et',
'reservations.wallet.addGoogle': 'Google Wallet-ə əlavə et',
'reservations.wallet.failed': 'Wallet kartını yaratmaq alınmadı. Yenidən cəhd edin.',
'reservations.wallet.undated': 'Əvvəlcə rezervasiyaya tarix verin: Wallet kartı həmin vaxta yaxın göstərir.',
};
+1
View File
@@ -274,6 +274,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Isso precisa de conexão. Tente de novo quando o TREK voltar a ficar online.',
'reservations.exportCsvFiltered': 'Ezporzhiañ ar {shown} diwar {total} renk skwer (CSV)',
'reservations.wallet.add': 'Adicionar à Apple Wallet',
'reservations.wallet.addGoogle': 'Adicionar à Google Wallet',
'reservations.wallet.failed': 'Não foi possível criar o passe da Wallet. Tente novamente.',
'reservations.wallet.undated': 'Primeiro dê uma data à reserva: a Wallet mostra o passe perto desse horário.',
};
+1
View File
@@ -277,6 +277,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Això necessita connexió. Torna-ho a provar quan TREK torni a estar en línia.',
'reservations.exportCsvFiltered': 'Exporta les {shown} de {total} files mostrades (CSV)',
'reservations.wallet.add': 'Afegeix a Apple Wallet',
'reservations.wallet.addGoogle': 'Afegeix a Google Wallet',
'reservations.wallet.failed': 'No s’ha pogut crear el passi de Wallet. Torna-ho a provar.',
'reservations.wallet.undated':
'Primer posa una data a la reserva: Wallet mostra el passi al voltant d’aquell moment.',
+1
View File
@@ -281,6 +281,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Na tohle je potřeba připojení. Zkus to znovu, až bude TREK zase online.',
'reservations.exportCsvFiltered': 'Exportovat zobrazené řádky, {shown} z {total} (CSV)',
'reservations.wallet.add': 'Přidat do Apple Wallet',
'reservations.wallet.addGoogle': 'Přidat do Google Wallet',
'reservations.wallet.failed': 'Kartu do Wallet se nepodařilo vytvořit. Zkuste to znovu.',
'reservations.wallet.undated': 'Nejdřív rezervaci zadejte datum: Wallet kartu zobrazí kolem toho času.',
};
+1
View File
@@ -279,6 +279,7 @@ const reservations: TranslationStrings = {
'Dafür braucht es eine Verbindung. Versuch es noch einmal, sobald TREK wieder online ist.',
'reservations.exportCsvFiltered': 'Die {shown} von {total} angezeigten Zeilen exportieren (CSV)',
'reservations.wallet.add': 'Zu Apple Wallet hinzufügen',
'reservations.wallet.addGoogle': 'Zu Google Wallet hinzufügen',
'reservations.wallet.failed': 'Der Wallet-Pass konnte nicht erstellt werden. Bitte versuch es erneut.',
'reservations.wallet.undated': 'Gib der Buchung zuerst ein Datum: Wallet zeigt den Pass rund um diesen Zeitpunkt an.',
};
+1
View File
@@ -276,6 +276,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'This needs a connection. Try again once TREK is back online.',
'reservations.exportCsvFiltered': 'Export the {shown} of {total} shown rows (CSV)',
'reservations.wallet.add': 'Add to Apple Wallet',
'reservations.wallet.addGoogle': 'Add to Google Wallet',
'reservations.wallet.failed': 'The Wallet pass could not be made. Please try again.',
'reservations.wallet.undated': 'Give the booking a date first: Wallet brings the pass up around its time.',
};
+1
View File
@@ -277,6 +277,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Esto necesita conexión. Vuelve a intentarlo cuando TREK esté de nuevo en línea.',
'reservations.exportCsvFiltered': 'Exportar las {shown} de {total} filas mostradas (CSV)',
'reservations.wallet.add': 'Añadir a Apple Wallet',
'reservations.wallet.addGoogle': 'Añadir a Google Wallet',
'reservations.wallet.failed': 'No se pudo crear el pase de Wallet. Inténtalo de nuevo.',
'reservations.wallet.undated': 'Primero ponle una fecha a la reserva: Wallet muestra el pase en torno a ese momento.',
};
+1
View File
@@ -276,6 +276,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Selleks on vaja ühendust. Proovi uuesti, kui TREK on taas võrgus.',
'reservations.exportCsvFiltered': 'Ekspordi näidatud read, {shown} / {total} (CSV)',
'reservations.wallet.add': 'Lisa Apple Walletisse',
'reservations.wallet.addGoogle': 'Lisa Google Walletisse',
'reservations.wallet.failed': 'Walleti passi ei õnnestunud luua. Proovi uuesti.',
'reservations.wallet.undated': 'Anna broneeringule kõigepealt kuupäev: Wallet näitab passi selle aja paiku.',
};
+1
View File
@@ -280,6 +280,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Cela nécessite une connexion. Réessaie dès que TREK sera de nouveau en ligne.',
'reservations.exportCsvFiltered': 'Exporter les {shown} lignes affichées sur {total} (CSV)',
'reservations.wallet.add': 'Ajouter à Apple Wallet',
'reservations.wallet.addGoogle': 'Ajouter à Google Wallet',
'reservations.wallet.failed': 'Impossible de créer la carte Wallet. Réessayez.',
'reservations.wallet.undated':
'Donnez d’abord une date à la réservation : Wallet affiche la carte autour de ce moment.',
+1
View File
@@ -279,6 +279,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Αυτό χρειάζεται σύνδεση. Δοκίμασε ξανά μόλις το TREK συνδεθεί ξανά.',
'reservations.exportCsvFiltered': 'Εξαγωγή των {shown} από {total} εμφανιζόμενων γραμμών (CSV)',
'reservations.wallet.add': 'Προσθήκη στο Apple Wallet',
'reservations.wallet.addGoogle': 'Προσθήκη στο Google Wallet',
'reservations.wallet.failed': 'Δεν ήταν δυνατή η δημιουργία της κάρτας Wallet. Δοκιμάστε ξανά.',
'reservations.wallet.undated':
'Δώστε πρώτα ημερομηνία στην κράτηση: το Wallet εμφανίζει την κάρτα γύρω από εκείνη την ώρα.',
+1
View File
@@ -278,6 +278,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'הפעולה הזו דורשת חיבור. נסו שוב כש-TREK יחזור לרשת.',
'reservations.exportCsvFiltered': 'ייצוא {shown} מתוך {total} השורות המוצגות (CSV)',
'reservations.wallet.add': 'הוספה ל-Apple Wallet',
'reservations.wallet.addGoogle': 'הוספה ל-Google Wallet',
'reservations.wallet.failed': 'לא ניתן היה ליצור את כרטיס ה-Wallet. אנא נסו שוב.',
'reservations.wallet.undated': 'קודם תנו להזמנה תאריך: Wallet מציג את הכרטיס סביב המועד שלה.',
};
+1
View File
@@ -278,6 +278,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Ehhez kapcsolat kell. Próbáld újra, amint a TREK újra online lesz.',
'reservations.exportCsvFiltered': 'A megjelenített {shown} sor exportálása a(z) {total} közül (CSV)',
'reservations.wallet.add': 'Hozzáadás az Apple Wallethez',
'reservations.wallet.addGoogle': 'Hozzáadás az Google Wallethez',
'reservations.wallet.failed': 'Nem sikerült létrehozni a Wallet-kártyát. Próbáld újra.',
'reservations.wallet.undated': 'Előbb adj dátumot a foglalásnak: a Wallet az időpont körül jeleníti meg a kártyát.',
};
+1
View File
@@ -267,6 +267,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Ini memerlukan koneksi. Coba lagi begitu TREK kembali online.',
'reservations.exportCsvFiltered': 'Ekspor {shown} dari {total} baris yang ditampilkan (CSV)',
'reservations.wallet.add': 'Tambahkan ke Apple Wallet',
'reservations.wallet.addGoogle': 'Tambahkan ke Google Wallet',
'reservations.wallet.failed': 'Pass Wallet tidak dapat dibuat. Silakan coba lagi.',
'reservations.wallet.undated': 'Beri tanggal pada pemesanan dulu: Wallet menampilkan pass di sekitar waktunya.',
};
+1
View File
@@ -275,6 +275,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Serve una connessione. Riprova quando TREK tornerà online.',
'reservations.exportCsvFiltered': 'Esporta le {shown} righe mostrate su {total} (CSV)',
'reservations.wallet.add': 'Aggiungi ad Apple Wallet',
'reservations.wallet.addGoogle': 'Aggiungi ad Google Wallet',
'reservations.wallet.failed': 'Impossibile creare il pass di Wallet. Riprova.',
'reservations.wallet.undated': 'Prima dai una data alla prenotazione: Wallet mostra il pass intorno a quel momento.',
};
+1
View File
@@ -267,6 +267,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'この操作には接続が必要です。TREK がオンラインに戻ってから、もう一度お試しください。',
'reservations.exportCsvFiltered': '表示中の {shown}/{total} 行をエクスポート (CSV)',
'reservations.wallet.add': 'Apple Walletに追加',
'reservations.wallet.addGoogle': 'Google Walletに追加',
'reservations.wallet.failed': 'Walletパスを作成できませんでした。もう一度お試しください。',
'reservations.wallet.undated': '先に予約に日付を入れてください。Walletはその時刻の前後にパスを表示します。',
};
+1
View File
@@ -267,6 +267,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': '연결이 필요한 작업입니다. TREK가 다시 온라인이 되면 다시 시도하세요.',
'reservations.exportCsvFiltered': '표시된 {total}행 중 {shown}행 내보내기 (CSV)',
'reservations.wallet.add': 'Apple Wallet에 추가',
'reservations.wallet.addGoogle': 'Google Wallet에 추가',
'reservations.wallet.failed': 'Wallet 패스를 만들지 못했습니다. 다시 시도하세요.',
'reservations.wallet.undated': '먼저 예약에 날짜를 지정하세요. Wallet은 그 시간 즈음에 패스를 보여 줍니다.',
};
+1
View File
@@ -276,6 +276,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Hiervoor is een verbinding nodig. Probeer het opnieuw zodra TREK weer online is.',
'reservations.exportCsvFiltered': 'De {shown} van {total} getoonde rijen exporteren (CSV)',
'reservations.wallet.add': 'Voeg toe aan Apple Wallet',
'reservations.wallet.addGoogle': 'Voeg toe aan Google Wallet',
'reservations.wallet.failed': 'De Wallet-pas kon niet worden gemaakt. Probeer het opnieuw.',
'reservations.wallet.undated': 'Geef de boeking eerst een datum: Wallet toont de pas rond dat moment.',
};
+1
View File
@@ -290,6 +290,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'To wymaga połączenia. Spróbuj ponownie, gdy TREK znów będzie online.',
'reservations.exportCsvFiltered': 'Eksportuj wyświetlone wiersze: {shown} z {total} (CSV)',
'reservations.wallet.add': 'Dodaj do Apple Wallet',
'reservations.wallet.addGoogle': 'Dodaj do Google Wallet',
'reservations.wallet.failed': 'Nie udało się utworzyć karty Wallet. Spróbuj ponownie.',
'reservations.wallet.undated': 'Najpierw nadaj rezerwacji datę: Wallet pokazuje kartę w okolicach tego terminu.',
};
+1
View File
@@ -288,6 +288,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Для этого нужно подключение. Попробуйте ещё раз, когда TREK снова будет онлайн.',
'reservations.exportCsvFiltered': 'Экспортировать показанные строки: {shown} из {total} (CSV)',
'reservations.wallet.add': 'Добавить в Apple Wallet',
'reservations.wallet.addGoogle': 'Добавить в Google Wallet',
'reservations.wallet.failed': 'Не удалось создать карту Wallet. Повторите попытку.',
'reservations.wallet.undated': 'Сначала укажите дату брони: Wallet показывает карту ближе к этому времени.',
};
+1
View File
@@ -284,6 +284,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Na toto je potrebné pripojenie. Skús to znova, keď bude TREK opäť online.',
'reservations.exportCsvFiltered': 'Exportovať zobrazené riadky, {shown} z {total} (CSV)',
'reservations.wallet.add': 'Pridať do Apple Wallet',
'reservations.wallet.addGoogle': 'Pridať do Google Wallet',
'reservations.wallet.failed': 'Kartu do Wallet sa nepodarilo vytvoriť. Skúste to znova.',
'reservations.wallet.undated': 'Najprv rezervácii zadajte dátum: Wallet kartu zobrazí okolo toho času.',
};
+1
View File
@@ -275,6 +275,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Det här kräver en anslutning. Försök igen när TREK är online igen.',
'reservations.exportCsvFiltered': 'Exportera de {shown} av {total} visade raderna (CSV)',
'reservations.wallet.add': 'Lägg till i Apple Wallet',
'reservations.wallet.addGoogle': 'Lägg till i Google Wallet',
'reservations.wallet.failed': 'Wallet-kortet kunde inte skapas. Försök igen.',
'reservations.wallet.undated': 'Ge bokningen ett datum först: Wallet visar kortet runt den tiden.',
};
+1
View File
@@ -269,6 +269,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'การทำงานนี้ต้องใช้การเชื่อมต่อ ลองอีกครั้งเมื่อ TREK กลับมาออนไลน์',
'reservations.exportCsvFiltered': 'ส่งออก {shown} จาก {total} แถวที่แสดง (CSV)',
'reservations.wallet.add': 'เพิ่มลงใน Apple Wallet',
'reservations.wallet.addGoogle': 'เพิ่มลงใน Google Wallet',
'reservations.wallet.failed': 'สร้างบัตร Wallet ไม่สำเร็จ โปรดลองอีกครั้ง',
'reservations.wallet.undated': 'กำหนดวันที่ให้การจองก่อน Wallet จะแสดงบัตรในช่วงเวลานั้น',
};
+1
View File
@@ -276,6 +276,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Bunun için bağlantı gerekiyor. TREK yeniden çevrimiçi olduğunda tekrar dene.',
'reservations.exportCsvFiltered': 'Gösterilen {total} satırdan {shown} tanesini dışa aktar (CSV)',
'reservations.wallet.add': 'Apple Cüzdan’a Ekle',
'reservations.wallet.addGoogle': 'Google Cüzdan’a Ekle',
'reservations.wallet.failed': 'Cüzdan kartı oluşturulamadı. Lütfen tekrar deneyin.',
'reservations.wallet.undated': 'Önce rezervasyona bir tarih verin: Cüzdan kartı o zamana yakın gösterir.',
};
+1
View File
@@ -288,6 +288,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': "Для цього потрібне з'єднання. Спробуйте ще раз, коли TREK знову буде онлайн.",
'reservations.exportCsvFiltered': 'Експортувати показані рядки: {shown} із {total} (CSV)',
'reservations.wallet.add': 'Додати до Apple Wallet',
'reservations.wallet.addGoogle': 'Додати до Google Wallet',
'reservations.wallet.failed': 'Не вдалося створити картку Wallet. Повторіть спробу.',
'reservations.wallet.undated': 'Спершу вкажіть дату бронювання: Wallet показує картку ближче до цього часу.',
};
+1
View File
@@ -270,6 +270,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': 'Thao tác này cần kết nối. Hãy thử lại khi TREK trực tuyến trở lại.',
'reservations.exportCsvFiltered': 'Xuất {shown} trong {total} dòng đang hiển thị (CSV)',
'reservations.wallet.add': 'Thêm vào Apple Wallet',
'reservations.wallet.addGoogle': 'Thêm vào Google Wallet',
'reservations.wallet.failed': 'Không thể tạo thẻ Wallet. Vui lòng thử lại.',
'reservations.wallet.undated': 'Hãy đặt ngày cho đặt chỗ trước: Wallet sẽ hiện thẻ vào khoảng thời gian đó.',
};
+1
View File
@@ -262,6 +262,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': '此操作需要網路連線。請在 TREK 恢復連線後再試一次。',
'reservations.exportCsvFiltered': '匯出顯示的 {shown}/{total} 列 (CSV)',
'reservations.wallet.add': '加入 Apple 錢包',
'reservations.wallet.addGoogle': '加入 Google 錢包',
'reservations.wallet.failed': '無法產生錢包票卡。請重試。',
'reservations.wallet.undated': '請先為訂位設定日期:錢包會在那個時間前後顯示票卡。',
};
+1
View File
@@ -262,6 +262,7 @@ const reservations: TranslationStrings = {
'reservations.needsConnection': '此操作需要网络连接。请在 TREK 恢复联网后重试。',
'reservations.exportCsvFiltered': '导出显示的 {shown}/{total} 行 (CSV)',
'reservations.wallet.add': '添加到 Apple 钱包',
'reservations.wallet.addGoogle': '添加到 Google 钱包',
'reservations.wallet.failed': '无法生成钱包卡券。请重试。',
'reservations.wallet.undated': '请先为预订设置日期:钱包会在那个时间前后显示卡券。',
};