Query Content Provider and documents

Post your questions and help other users.

Moderator: Martin

Post Reply
anuraag
Posts: 369
Joined: 24 Jan 2015 02:06

Query Content Provider and documents

Post by anuraag » 07 Dec 2018 14:38

I am trying to get file name, file path using Query Content Provider for contentUri like this
"content://com.android.providers.media.documents/document/image%3A47128";
"content://com.android.providers.downloads.documents/document/456"

I am getting error
"Permission Denial: opening provider com.android.providers.downloads.DownloadStorageProvider from ProcessRecord{71a3004 2854:ch.gridvision.ppam.androidautomagic/u0a132} (pid=2854, uid=10132) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs".

======================================
Edit : it looks to work only if triggered using send/share intent or action: start activity-pickup file". So problem solved.

Post Reply