public void shareFile(){
Intent intentShareFile = new Intent(Intent.ACTION_SEND);
if(myFile.exists()) {
intentShareFile.setType("application/pdf");
intentShareFile.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(myFile));
intentShareFile.putExtra(Intent.EXTRA_SUBJECT,
"Sharing File from Webkul...");
intentShareFile.putExtra(Intent.EXTRA_TEXT, "Sharing File from Webkul to purchase items...");
context.startActivity(Intent.createChooser(intentShareFile, "Share File Webkul"));
}
}
Be the first to comment.