diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-09 12:08:31 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-09 12:08:31 +0200 |
| commit | 6832df6177ad973ad0e1b4f0a49d7a6da06c6e04 (patch) | |
| tree | d9040ce0da5d82400d1b973344615ca1c6b67b3c /packages/meshbay-android/app/src/main/AndroidManifest.xml | |
| parent | 2860f1de75af1d44d35292ecbf79c68f02409d19 (diff) | |
| download | meshbay-6832df6177ad973ad0e1b4f0a49d7a6da06c6e04.tar.gz | |
feat: notifications on Android while closed, with nothing to install
The phone fetches what is new every fifteen minutes with a poll secret
(POST /v1/push/poll) that reads notification lines and nothing else. When a
UnifiedPush distributor is already installed, the hub also pushes at once,
encrypted to the phone (RFC 8291); losing the distributor falls back to
fetching.
The hub now honours "disable all notifications" itself: create_notification
creates nothing for that account, as it already did for a muted group, so
neither switch lets anything reach a phone. The interface used to be the only
reader of the account-wide switch.
Push endpoints are member-supplied URLs: a send refuses non-public
addresses, connects to the address it checked, and follows no redirect.
Android build untested here (no SDK on this machine).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-android/app/src/main/AndroidManifest.xml')
| -rw-r--r-- | packages/meshbay-android/app/src/main/AndroidManifest.xml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/meshbay-android/app/src/main/AndroidManifest.xml b/packages/meshbay-android/app/src/main/AndroidManifest.xml index 2eae3ea..0c234aa 100644 --- a/packages/meshbay-android/app/src/main/AndroidManifest.xml +++ b/packages/meshbay-android/app/src/main/AndroidManifest.xml @@ -8,6 +8,11 @@ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> + <!-- Notifications from the hub, fetched or pushed; asked for when the + person turns them on, never at start. --> + <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> + <!-- The periodic fetch survives a reboot (JobInfo.setPersisted). --> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <!-- No backup of any kind: the keys are wrapped by a Keystore key that a restore cannot bring with it, so a backed-up store is one that silently @@ -36,6 +41,19 @@ android:name=".cast.CastService" android:exported="false" android:foregroundServiceType="mediaPlayback" /> + <!-- Not exported: the connector's own receiver takes the distributor's + broadcasts and hands them here inside the application. --> + <service + android:name=".notify.PushReceiver" + android:exported="false"> + <intent-filter> + <action android:name="org.unifiedpush.android.connector.PUSH_EVENT" /> + </intent-filter> + </service> + <service + android:name=".notify.PollJob" + android:exported="false" + android:permission="android.permission.BIND_JOB_SERVICE" /> <meta-data android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" android:value="org.meshbay.client.cast.CastOptionsProvider" /> |