android - Open image for sharing -
i have android xamarin application imageview onclik lunch intent preview image
file file = new file(photopath); intent intent = new intent(intent.actionview); intent.setdataandtype(uri.fromfile(file), "image/*"); intent.setflags(activityflags.nohistory); startactivity(intent);
from apps choose 'gallery' when image opend there no sharing options
when open image device 'gallery' has sharing options
image saved sd card before preview. doing wrong ?
solution worked me
intent intent = new intent(); intent.putextra(intent.actionview, photopath); intent.settype("image/*"); startactivity(intent.createchooser(intent, "select picture"));
now image opend in gallery , can use sharing options too
Comments
Post a Comment