[ai] android tv: Support ACTION_OPEN_DOCUMENT file picking - #4707
Open
muhamadsyafii wants to merge 1 commit into
Open
[ai] android tv: Support ACTION_OPEN_DOCUMENT file picking#4707muhamadsyafii wants to merge 1 commit into
muhamadsyafii wants to merge 1 commit into
Conversation
Some Android TV applications use ACTION_OPEN_DOCUMENT to find a file manager, while Amaze only advertised ACTION_GET_CONTENT. Advertise the missing intent and route it through the existing file-picking flow so selected files are returned to the caller. Add regression coverage for manifest resolution and picker mode. Verified on Android TV API 25 and Android Box API 28. Fixes TeamAmaze#4079.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #4079
Description
Some Android TV applications use
ACTION_OPEN_DOCUMENTto find afile manager, while Amaze only advertised
ACTION_GET_CONTENT.Advertise the missing intent and route it through the existing
file-picking flow so selected files are returned to the caller.
The existing
GET_CONTENTbehavior remains unchanged.Add regression coverage for manifest resolution and file-picker mode
activation.
Amaze was verified as an available file manager alongside Material
Files. Selecting
ALWAYSmade subsequentOPEN_DOCUMENTrequestslaunch Amaze directly without displaying
ResolverActivity.Issue tracker
Fixes #4079
Automatic tests
Successfully ran:
./gradlew :app:testFdroidDebugUnitTest --tests com.amaze.filemanager.ui.activities.MainActivityTest --tests com.amaze.filemanager.ui.fragments.MainFragmentReturnIntentResultsTestManual tests
Done
Devices:
OS:
Manually verified:
ACTION_OPEN_DOCUMENTwith*/*ACTION_OPEN_DOCUMENTwith specific MIME typesACTION_GET_CONTENTflowMainActivityintent handlingALWAYSlaunches Amaze directly on later requestsSecurityException, or unintended file viewersBuild tasks success
Successfully running following tasks on local:
./gradlew assembledebug./gradlew assembleFdroidDebug./gradlew spotlessCheckGenerative code
This PR used generative code tools (GenAI, LLMs, etc.)
Model: Codex
Version: GPT-5
Provider: OpenAI
Additional technical write-up
A more detailed explanation of the root cause, implementation decisions,
and physical Android TV testing is available here:
Making Amaze Discoverable as a File Manager on Android TV
Screenshots
Amaze is now discovered alongside Material Files as an
ACTION_OPEN_DOCUMENThandler on an Android Box running Android 9(API 28).
After selecting Amaze, Android provides the
JUST ONCEandALWAYSoptions, allowing Amaze to become the default handler for matching
file-picker requests.