拨打之前判断硬件是否提供该服务
public static void callPhone(String phone) {
//6.0以后要权限判断
final Intent dialIntent = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:"+phone));
if (dialIntent.resolveActivity(context.getPackageManager())!=null) {
startAcitity(dialIntent);
}else{
}
}
网友评论