I want share image from on click of button
Java code
public void share(View v)
{
    Intent share = new Intent(Intent.ACTION_SEND);
    share.setType("image/*");
    Uri a=Uri.parse("android.resource://"+getPackageName()+"/"+R.drawable.pic); 
    Log.i("imageUri",""+imageUri);
    share.putExtra(Intent.EXTRA_STREAM,a);
    startActivity(Intent.createChooser(share,"Share Image"));
}
by this code is not working , what changes should i do ?
 
     
     
    