/**
* 调用拨号功能
* @param strCon
*/
public void CallPhone(String strCon) {
// TODO Auto-generated method stub
Intent intent=null;
Toast.makeText(getApplicationContext(), "电话:"+strCon,Toast.LENGTH_SHORT).show();
intent=new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+strCon));
//短信
//Intent intent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:"+strCon));
startActivity(intent);
}
/**
* 调用查看联系人相关信息
* @param id 为联系人表contacts 中_id
*/
public void CallView(String id){
Intent intent=null;
intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("content://contacts/people/"+id));
startActivity(intent);
}
调用android 中的拨号功能、调用某个联系人信息、调用对默认号码的短信
最新推荐文章于 2019-04-01 14:44:25 发布