Skip to content

SEND_MESSAGE intent file support#175

Open
jhotmann wants to merge 2 commits into
binwiederhier:mainfrom
jhotmann:send-message-intent-file-support
Open

SEND_MESSAGE intent file support#175
jhotmann wants to merge 2 commits into
binwiederhier:mainfrom
jhotmann:send-message-intent-file-support

Conversation

@jhotmann

Copy link
Copy Markdown

First off, I'm a huge fan of ntfy and it's one of my favorite self-hosted apps!

Anyways, I am building https://codeberg.org/clipshift/android which uses ntfy as the backend and on android uses the ntfy app's intents so subscriptions don't have to be configured in 2 apps. I was adding image and long-text support when I realized that the SEND_MESSAGE intent didn't support files. So with the help of my friend Claude (I'm a backend dev with very little android dev experience) I added it.

I have tested it successfully with the dedug build, though it should probably be noted in the documentation that context.grantUriPermission("io.heckel.ntfy[.debug]", contentUriObject, Intent.FLAG_GRANT_READ_URI_PERMISSION) must be called before the intent is broadcast. So this may not work with automation apps like Tasker unless they already do that (haven't tested that).

jhotmann and others added 2 commits April 15, 2026 14:49
Adds file_uri (content:// URI string) and filename (optional override)
extras to the io.heckel.ntfy.SEND_MESSAGE broadcast intent. Validates
that file_uri uses the content:// scheme, derives filename from the URI
via fileStat() if not overridden, and pipes the file as the raw HTTP
body via ContentUriRequestBody — matching the ShareActivity pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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