想用按钮直接自动打电话,不是用
Intent in=new Intent (Intent.Action_Call);
in.setData(Util.parse("tell:"+number);
而是自动用联系人列表,自动一个接一个打电话。
我用for循环,但是好像打乱了,不是按列表打的。
for(int i=al_all.size()-1;i>=position;i--)
{
part_call=al_all.get(i);
if(part_call != null)
{
//System.out.println(part_call);
String phone_num=part_call.get("phone").trim();
System.out.println("phone_number:"+phone_num);
Intent intent=new Intent(Intent.ACTION_CALL);
Uri number_uri=Uri.parse("tel:"+phone_num);
intent.setData(number_uri);
mContext.startActivity(intent);
}else{
ToastUtils.showToast(mContext , "电话结束");
}
}