Intend之Date实现拨号

封装为一个方法

1 //跳转到拨号页面的方法
2     protected void takeCall(String info){
3         Intent intent=new Intent();
4         intent.setData(Uri.parse("tel://"+info));
5         intent.setAction(Intent.ACTION_DIAL);
6         startActivity(intent);
7     }

此时参数info即为传入的号码,点击按钮(在此按钮的监听器中添加takeCall方法),就可到拨号页面

猜你喜欢

转载自www.cnblogs.com/z-cg/p/12357312.html