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 enter image description here

when open image device 'gallery' has sharing options

enter image description here

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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -