Skip to content

Instantly share code, notes, and snippets.

@SemonCat
Created March 18, 2015 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SemonCat/838505d871e4c5e124ee to your computer and use it in GitHub Desktop.
Save SemonCat/838505d871e4c5e124ee to your computer and use it in GitHub Desktop.
Intent showImageIntent = new Intent(Intent.ACTION_VIEW);
if (uri != null) {
showImageIntent.setDataAndType(uri, "image/*");
} else {
showImageIntent.setDataAndType(Uri.parse("file://" + dataPath), "image/*");
}
showImageIntent.setClassName("com.asus.gallery", "com.asus.gallery.app.EPhoto");
showImageIntent.putExtra("launch-from-camera", true);
rv.setOnClickFillInIntent(R.id.photo_canvas, showImageIntent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment