我正在从事会议经理申请。当用户单击特定配置文件时,将调用dialConference
函数。
private void dialConference()
{
String str = "tel:";
int i = 0;
if (i >= this.confProfile.arrayValue.size())
{
startActivity(new Intent("android.intent.action.CALL", Uri.parse(str)));
return;
}
ProfileDataValue localProfileDataValue = (ProfileDataValue)this.confProfile.arrayValue.get(i);
if (i != 0)
{
if (localProfileDataValue.iDelay / 2 != 0)
break label128;
str = str + "%2C";
}
while (true)
{
localProfileDataValue.strValue = localProfileDataValue.strValue.replace("#", "%23");
str = str + localProfileDataValue.strValue;
i++;
break;
label128: int j = localProfileDataValue.iDelay / 2;
for (int k = 0; k < j; k++)
str = str + "%2C";
}
}
答案 0 :(得分:1)
此方法正常工作,可以在通话期间给出时间延迟并执行下一个号码。
private void call(int profileid){
ProfileDo profile = adapter.getProfile(profileid);
String call = "tel:";
for (StepDO step : profile.getSteps()) {
String value = URLEncoder.encode(step.getValue());
int delay = step.getDelay();
String pausesStr = "";
for (int i = 0; i < delay/2; i++) {
pausesStr += PhoneNumberUtils.PAUSE;
}
call += value + pausesStr;
System.out.println(""+call);
}
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(call));
startActivity(callIntent);
}
}