How to display image with intent.ACTION_VIEW
问题 My grammar can run at android 5.1 but is not working at android 7.1.... File file = new File(Environment.getExternalStorageDirectory(), "Pictures/1481853170451.jpg"); Toast.makeText(MainActivity.this, file.getPath(), Toast.LENGTH_LONG).show(); Uri path = Uri.fromFile(file); if (file.exists()) { Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(path, "image/*"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { this.startActivity