[英]how to share audio on whatsapp.. its not working
How to share audio on WhatsApp? 如何在WhatsApp上共享音频? This is my code:
这是我的代码:
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("audio/mp3");
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse(dialog_audio));
context.startActivity(Intent.createChooser(shareIntent, "mp3 shared!"));`
Try adding this line 尝试添加此行
shareIntent.setPackage("com.whatsapp");
and Remember to have the permission 并记住要获得许可
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.