mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-10 14:20:56 +00:00
3c4c880c31
The Android app now subscribes like the iOS one: TrekShell.registerPush asks for the notification permission (Android 13+), creates the device's P-256 Web Push keys and returns the relay endpoint for its FCM token (push.liketrek.com/v1/fcm/<token>). TrekPushService receives the relay's data message, decrypts the record (RFC 8291, TrekWebPush) and shows the notification. A tap opens the linked page, also when it starts the app. The keys are sealed with an AES key kept in the Android Keystore. Firebase is configured from res/values/firebase.xml, so no google-services plugin is needed. The decryption is tested against the RFC 8291 example, and the native workflow now runs the Android unit tests. On the web side push is no longer limited to iOS: it follows the nativePush capability on both platforms.