Skip to content

Add Save as option for VIEW intents with content:// URIs#4486

Open
SolsticeSpectrum wants to merge 1 commit intoTeamAmaze:release/4.0from
SolsticeSpectrum:feature/save-as-view-intent
Open

Add Save as option for VIEW intents with content:// URIs#4486
SolsticeSpectrum wants to merge 1 commit intoTeamAmaze:release/4.0from
SolsticeSpectrum:feature/save-as-view-intent

Conversation

@SolsticeSpectrum
Copy link
Copy Markdown

Description

Adds "Save as" option when opening files via VIEW intent with content:// URIs.

Previously, when apps like Mattermost send a VIEW intent for a single file, users only saw "Amaze Document Viewer" which just prompts to download File Utilities. Now users will also see "Save as" option that triggers the existing save flow.

Automatic tests

  • Added test cases

Manual tests

  • Done

  • Device: Nothing Phone 2

  • OS: Android 16

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@VishnuSanal VishnuSanal added the PR-Awaiting-Initial-Review this PR is awaiting for an initial review label Mar 21, 2026
Copy link
Copy Markdown
Member

@VishnuSanal VishnuSanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SolsticeSpectrum thanks for contributing to Amaze, this works well in testing from my testing. I have one comment to address, andwe are GTG, thanks! please create an issue for this feature, btw.-

* http://teamamaze.xyz/open_file?path=path-to-file
*/
path = Utils.sanitizeInput(uri.getQueryParameter("path"));
} else if (uri != null && ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TranceLove shouldn't we probably sanitize the links here? WDYT?

@VishnuSanal VishnuSanal requested a review from TranceLove March 22, 2026 14:43
@VishnuSanal VishnuSanal added PR-Awaiting-Final-Review this PR is awaiting a final review/approval and removed PR-Awaiting-Initial-Review this PR is awaiting for an initial review labels Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Awaiting-Final-Review this PR is awaiting a final review/approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants