0

I have the following Intent to View an image:

Intent intent = new Intent(Intent.ACTION_VIEW,uri);
intent.setDataAndType(uri,"image/*");
try {
startActivity(intent);
} catch (Exception ex) {
Toast.makeText(getApplicationContext(),ex.getMessage(),Toast.LENGTH_SHORT).show();
}

where the URI is content://com.android.providers.media.documents/document/image:30506

but I get "Media non found".

What an i doing wrong?

user229044
  • 232,980
  • 40
  • 330
  • 338
Lisa Anne
  • 4,482
  • 17
  • 83
  • 157

1 Answers1

0

See this thread regarding opening image via intent or you can take a look over here

Community
  • 1
  • 1
crazyPixel
  • 2,301
  • 5
  • 24
  • 48