Reputation: 11
I'm trying to share a file from my android app, but I'm getting an error like file not supported or unknown file.
CommonMethods commonMethods = new CommonMethods();
String internalFile = commonMethods.getDate();
String sharepath = Environment.getExternalStorageDirectory() + "/My Records/" + internalFile + "/";
Uri urii = Uri.parse(sharepath);
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("audio/*");
share.putExtra(Intent.EXTRA_STREAM,urii);
startActivity(Intent.createChooser(share,"Share Sound File"));
Upvotes: 1
Views: 121