title: How to share a file in Android programmatically
body: <p>I want to share a file(.pdf,.apk etc) using share Intent, I searched google but I find only the code for sharing Image</p>
  
  <pre><code>Intent sharingIntent = new Intent(Intent.ACTION_SEND);
  Uri screenshotUri = Uri.parse(path);
  sharingIntent.setType("image/png");
  sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
  startActivity(Intent.createChooser(sharingIntent, "Share image using"));
  </code></pre>