i trying capture qr code , share image via email in android code. however, when try transfer email client, shows blank image instead of qr code.
my code method is:
protected void openshareactivity(bitmap qrcodebitmap){ try { string path = images.media.insertimage(getcontentresolver(), qrcodebitmap,"test", null); uri screenshoturi = uri.parse(path); final intent emailintent1 = new intent(android.content.intent.action_send); emailintent1.setflags(intent.flag_activity_new_task); emailintent1.putextra(intent.extra_stream, screenshoturi); emailintent1.settype("image/png"); startactivity(intent.createchooser(emailintent1, "send email using")); } catch(exception e) { e.printstacktrace(); } }
please me understand going wrong!
Comments
Post a Comment