I'm trying to share images with Facebook, twitter, etc using SHARE INTENT
from Android.
I found code to send a image to the share intent, but this code needs the URI of the bitmap: fullSizeImageUri
This is the full code:
private void startShareMediaActivity(Bitmap image) {
boolean isVideo=false;
String mimeType="bmp";
Uri fullSizeImageUri=null;
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType(mimeType);
intent.putExtra(Intent.EXTRA_STREAM, fullSizeImageUri);
try {
startActivity(Intent.createChooser(intent, (isVideo ? "video" : "image")));
} catch (android.content.ActivityNotFoundException ex) { }
}
How to transform a Bitmap into a Uri?
question from:
https://stackoverflow.com/questions/8295773/how-can-i-transform-a-bitmap-into-a-uri 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…