Android share ListView content -
i have many items in soundboard , need share them.i have tried
private void shareimage(int resid) { intent share = new intent(intent.action_send); // if want share png image only, can do: // settype("image/png"); or jpeg: settype("image/jpeg"); share.settype("audio/mp3"); // make sure put example png image named myimage.png in // directory string imagepath = "android.resource://com.example.app/" + resid; file imagefiletoshare = new file(imagepath); uri uri = uri.fromfile(imagefiletoshare); share.putextra(intent.extra_stream, uri); startactivity(intent.createchooser(share, "share image!")); }
but without succes! thanks
few, if any, android apps set <intent-filter>
handles android.resource
scheme. either copy file internal storage , use fileprovider
, or use streamprovider
(which streams resources), have content
uri
instead.
Comments
Post a Comment