|
|
@@ -70,6 +70,25 @@ public class OpenExternalAppUtil {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * @method startNavigationGoogle
|
|
|
+ * @description 打开WhatsApp 指定号码
|
|
|
+ * @date: 2020/9/27 13:57
|
|
|
+ * @author: niusongtao
|
|
|
+ * @param
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public static Intent startWhatsApp(String value,String phoneNum) {
|
|
|
+ if (isAvailable(getContext(), "com.whatsapp")) {
|
|
|
+ // sendIntent.setPackage("com.whatsapp");//区别别的应用包名
|
|
|
+ return new Intent(Intent.ACTION_VIEW,Uri.parse("https://api.whatsapp.com/send?phone="
|
|
|
+ + phoneNum+ "&text=" + value));
|
|
|
+ }
|
|
|
+ ToastUtils.showShort(getContext().getString(R.string.have_no_whats_app));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//验证各种导航地图是否安装
|
|
|
public static boolean isAvailable(Context context, String packageName) {
|
|
|
//PackageManager
|