Skip to content

Instantly share code, notes, and snippets.

@sjthn
Created January 27, 2017 18:40
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 sjthn/95da65ecbf41a428e3e11f095282d17a to your computer and use it in GitHub Desktop.
Save sjthn/95da65ecbf41a428e3e11f095282d17a to your computer and use it in GitHub Desktop.
if (type.equals("image/png")){
Uri fileStream = intentReader.getStream();
Bitmap bitmap = null;
try {
InputStream inputStream = getContentResolver()
.openInputStream(fileStream);
bitmap = BitmapFactory.decodeStream(inputStream);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment