zhanghai / zhanghai/MaterialFiles

Document consumer to display EXTRA_INFO message

Open
#1,102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
9k
Forks
736
PR merge metrics
No merged PRs in 30d

Description

Document providers can return a EXTRA_INFO string in the cursor, this is to be displayed so the user can tell what is going on. I'd be great if you could display this message to the user.

        MatrixCursor result = new MatrixCursor(DEFAULT_DOCUMENT_PROJECTION) {
            public String extra_info = null;

            @Override
            public Bundle getExtras() {
                Bundle bundle = new Bundle();
                bundle.putBoolean(DocumentsContract.EXTRA_LOADING, extra_info != null);
                bundle.putString(DocumentsContract.EXTRA_INFO, "queryDocument: Connecting to server ...");
                return bundle;
            }
        };

        result.setNotificationUri(getContext().getContentResolver(), DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, documentId));
        return result;
    }

Many thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Android document consumer handles cursor extras from DocumentsContract, especially EXTRA_LOADING and EXTRA_INFO. Confirm where provider results reach the user-facing UI, then verify that a provider-supplied EXTRA_INFO string such as "queryDocument: Connecting to server ..." is displayed while loading.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.