Skip to content

Send data-only messages to Android apps that open previews themselves - #4

Merged
sivert-io merged 1 commit into
mainfrom
claude/GRYT-1698-android-data-only
Oct 8, 2026
Merged

sivert-io merged 1 commit into
mainfrom
claude/GRYT-1698-android-data-only

Conversation

@sivert-io

Copy link
Copy Markdown
Member

Android phones that can open sealed previews now get data-only messages, so the app gets to build the notification itself (GRYT-1698).

Android shows a message that has a notification block on its own while the app is in the background. The app never sees it, so it can't swap "New message" for who wrote and what. A message with only data goes to the app instead.

  • POST /v1/devices takes opens: true. The relay only honours it for Android, and stores it in a new opens column. An existing push.db gets the column on start-up with ALTER TABLE, defaulting to 0.
  • A push for an opens device that carries a preview is sent data-only: { c, p, t, b }, where t and b are the fixed title and text the app falls back to if it can't open p.
  • Everything else is sent as before: iOS, older Android apps, and pushes without a preview.

Look at:

  • The ALTER TABLE on start-up. It's the first schema change since push.db shipped.
  • An app that registers with opens: true has to actually handle data-only messages. If it doesn't, it shows nothing at all. The app half is the mobile PR that goes with this one.

🤖 Generated with Claude Code

A notification message is shown by Android without waking the app, so it could never replace the fixed text with the sealed preview. Phones that register with opens: true get data-only messages carrying the preview and the fallback text (GRYT-1698).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sivert-io
sivert-io merged commit b36da99 into main Oct 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant