我正在处理会议管理器应用程序。我正在使用ACTION_CALL功能拨打电话和ACTION_DIAL拨打电话号码。但是呼叫是分开的,拨号操作是分开的。任何人都可以帮助我吗?这是我的代码
private void call(int profileid){
ProfileDo profile = adapter.getProfile(profileid);
int stepCount = 0;
long previousStepDelay = 0;
for (StepDO step : profile.getSteps()) {
Intent callIntent;
String url = "tel:" + step.getValue();
stepCount++;
if (stepCount == 1) {
callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
startActivity(callIntent);
} else {
try {
Thread.sleep(previousStepDelay * 1000);
System.out.println("hai");
} catch (InterruptedException e) {
e.printStackTrace();
}
callIntent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
startActivity(callIntent);
}
previousStepDelay = step.getDelay();
}
}
}