2

I am getting this error:

java.lang.SecurityException: Permission Denial: reading com.google.android.gm.sapi.SapiUiProvider uri content://com.google.android.gm.sapi/[email protected]/message_attachment_external/#thread-f:1767858831150858747/#msg-f:1767858831150858747/0.1 from pid=14714, uid=10343 requires the provider be exported, or grantUriPermission()

in this line:

Cursor fileCursor = getContentResolver().query(uri, new String[]{ OpenableColumns.DISPLAY_NAME }, null, null, null);

manifest

<intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <action android:name="android.intent.action.GET_CONTENT"/>
                <action android:name="android.intent.action.OPEN_DOCUMENT"/>
                <action android:name="android.intent.action.PICK"/>
                <category android:name="android.intent.category.OPENABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="content"/>
                <data android:pathPattern=".*\.gpx"/>
                <data android:mimeType="application/xml"/>
                <data android:mimeType="application/octet-stream"/>
            </intent-filter>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.