Guest User

Untitled

a guest
Dec 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. showLoading("Saving...");
  2. File f = new File(Environment.getExternalStorageDirectory()
  3. + File.separator + ""
  4. + System.currentTimeMillis() + ".png");
  5. photoEditorView.getSource().setImageURI(Uri.fromFile(f));
  6. Uri contentUri = Uri.fromFile(f);
  7. Intent share = new Intent(Intent.ACTION_SEND);
  8. share.setType("image/png");
  9. ContentValues values = new ContentValues();
  10. values.put(MediaStore.Images.Media.TITLE, "title");
  11. values.put(MediaStore.Images.Media.MIME_TYPE, "image/png");
  12. share.putExtra(Intent.EXTRA_STREAM, contentUri);
  13. startActivity(Intent.createChooser(share, "Share Image!"));
Add Comment
Please, Sign In to add comment