我开发了一个 ionic 3 应用程序。我无法从我的应用程序中打开 whatsapp,其中包含 ionic 3 中的特定联系人。我不想发送或分享任何东西,只想从我的应用程序中与特定联系人一起打开Android和iOS中的WhatsApp。有什么方法可以打开什么应用程序吗? 到目前为止,我已经实现了以下不起作用
window.open(`whatsapp:${+911234567890}`, '_system');
任何帮助非常感谢。
看到它: http://phonegap-plugins.com/plugins/ranjitpandit/whatsapp-phonegap-plugin
cordova.plugins.Whatsapp.send("yourNumber", sucessoCallback, errorCallback(;
我正在使用这个:
String phone = "+8801510101010";
PackageManager packageManager = MainActivity.this.getPackageManager();
Intent i = new Intent(Intent.ACTION_VIEW);
try {
String url = "https://api.whatsapp.com/send?phone="+ phone;
i.setPackage("com.whatsapp");
i.setData(Uri.parse(url));
if (i.resolveActivity(packageManager) != null) {
MainActivity.this.startActivity(i);
}
} catch (Exception e){
e.printStackTrace();
}