ash*_*dey 1 java android whatsapp
在我的 android 应用程序中,用户填写手机号码的文本框和他想要发送到该手机号码的消息并单击发送按钮后,该消息应直接发送到该手机号码,而无需让用户单击 WhatsApp 应用程序中的发送按钮。
以下是我用于发送 WhatsApp 消息的代码。
Uri mUri = Uri.parse("https://api.whatsapp.com/send?phone=9197xxxxxx88&text='Hello User'");
Intent intent = new Intent("android.intent.action.VIEW", mUri);
intent.setPackage("com.whatsapp");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3651 次 |
最近记录: |