I am trying to share an images from arraylist,when I click on share button app list appears to share but when I select an app to share,it shows null in another app.
please help me to find out the solution :(
here is my recycler onBindViewHolder code.
holder.send.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
final String image_path = fileslist.get(position).getUri().toString();
File share = new File(image_path);
Uri uri = Uri.fromFile(share);
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("image/");
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
context.startActivity(Intent.createChooser(shareIntent, "Share to....."));
}
});
