0

I am trying to create a custom alert dialog which has a imageview.

But when i try to show the image using glide nothing appears except a blank white diaog

if (sharedPrefManager.getHomeData().getProfileImage() == null)
      imageView.setImageResource(R.drawable.user);
else {
 Uri uri = Uri.parse(sharedPrefManager.getHomeData().getProfileImage());
                            imageView.setImageURI(uri);
     }

For the fist time when i launch the image and try to display the image on alert dialog its giving me this error --- java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{d3499c7 8221:com.example.resumie/u0a488} (pid=8221, uid=10488) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

But when i open the app and first select the image from gallery then display it on alert dialog it works fine.

0 Answers0