Android-Rich-text-Editor icon indicating copy to clipboard operation
Android-Rich-text-Editor copied to clipboard

I'm this error while showing the text with image. java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider

Open MuhammadSaudKhan opened this issue 5 years ago • 2 comments

I'm this error while showing the text with image. First time it will display the image correctly but when close the app reopen the app and want to see the text with image the app will crashed because of the following exception. Kindly guide me to solve this problem. Thanks java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider

MuhammadSaudKhan avatar Nov 03 '20 19:11 MuhammadSaudKhan

Hi @MuhammadSaudKhan , sorry for the late response! Do you have your problem resolved now? Reading from the exception message: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider, it seems like it is caused by some permission issue, that is to say, you have to ask user for the document provider permissions, like the issue at here.

I'd like to see the exception details if you haven't yet figured it out.

Thanks.

chinalwb avatar Nov 08 '20 12:11 chinalwb

@MuhammadSaudKhan , This error is because file is selected from gallery but while re-opening app doesn't have access to that URI location. So, you need to save image in some folder and put that URI in image path.

rishabhk669 avatar Mar 25 '21 16:03 rishabhk669