How to view an image with default gallery in Android 8.0?
0 I wanted to view my recently downloaded image with my default gallery app in my Android 8.0 [Oreo] . I have been using intent for that, but it shows notification as " Media not found ". After doing bit search on it, I found that, for " Android N and above " we need to use "FileProvider" but I did not found good explanatory post for that, so please help me on it..... Please help me by either using intent or file provider: My code is as follows: String root = Environment.getExternalStorageDirectory().toString(); public void onClick(DialogInterface dialog, int id) Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(root + "/h_jokes_images/"+fname+".jpg"), "image/mime"); startActivity(intent); java android-intent android-contentprovider android-gallery android-fileprovider share | improve this question edited Nov 17 '18 at 6:01 prasad_21