I store photos in SqLite base in Base64 format.
And I need to send this pictures throw email.
For emailing I use Intent.ACTION_SEND.
It is a lot of manuals, how to add File throw Uri to email:
ArrayList<Uri> uris = new ArrayList<Uri>();
for(String address: pack.getPhotoFileNames()){
uris.add(Uri.parse("file://"+address));
}
emailIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
emailIntent.putParcelableArrayListExtra(android.content.Intent.EXTRA_STREAM, uris);
like this.
But in this case I need to create File, save it on disk, store Uri to this file, delete file after sending, etc.
So, what is the shortest way to send JPEG created from Base64 (or Bitmap) throw email?
Or: how can I put JPEG files in email without creating temporary files, just from Base64?