With the device path you can use:
final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("audio/3gpp");
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse("file://"+path+filename));
startActivity(Intent.createChooser(shareIntent, getString(R.string.share_sound)));
Function option for whatsapp, for example:
public void onClick(View v) {
final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
String audioClipFileName="audio.3gp";
shareIntent.setType("audio/3gpp");
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse("file://"+"/sdcard/"+audioClipFileName));
shareIntent.setPackage("com.whatsapp");
startActivity(Intent.createChooser(shareIntent, "Compartilhando no whatsapp"));
}
IF YOUR PATH IS EXTERNAL. Remembering the MyApp / Images folders should be created in the app install:
Environment.getExternalStorageDirectory().getAbsolutePath() +
"/MeuApp/Imagens/";
For more details, click here.