Day14 支付宝集成
一.支付宝集成:看录屏
二.判断手机是否安装支付宝
Uri uri = Uri.parse("alipays://platformapi/startApp");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
ComponentName componentName = intent.resolveActivity(getPackageManager());//componentName 值为空则没安装
if (componentName == null){
Toast.makeText(HaunXinMainActivity.this, "没有安装支付宝", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(HaunXinMainActivity.this,"安装支付宝了",Toast.LENGTH_SHORT).show();
pay();
}