源码

android – 通过WhatsApp发送消息意图


我怎么能从我的应用程序发送按摩到WhatsApp的特殊号码,我知道这个代码分享按摩组或联系whatsapp

Intent waIntent = new Intent(Intent.ACTION_SEND);
waIntent.setType("text/plain");
String text = "Sorry For Interruption,I'm Just Trying Something";
waIntent.setPackage("com.whatsapp");

if (waIntent != null) {
    waIntent.putExtra(Intent.EXTRA_TEXT, text);//
    startActivity(Intent.createChooser(waIntent,"Share with"));

但我想按照特殊号码发送按摩,如“966xxxxxxx”我怎么能这样做?

(1)

本文由 投稿者 创作,文章地址:https://blog.isoyu.com/archives/android-tongguowhatsappfasongxiaoxiyitu.html
采用知识共享署名4.0 国际许可协议进行许可。除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为:9 月 26, 2019 at 04:31 上午

热评文章