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
  • 222,134
  • 40
  • 319
  • 330
Lisa Anne
  • 4,654
  • 16
  • 75
  • 151

1 Answers1

0

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

Community
  • 1
  • 1
crazyPixel
  • 2,239
  • 5
  • 23
  • 47