我通过这个代码发送dtmf音调。
String number="tel:+962791212121,2,3,3";
Intent c1= new Intent(android.content.Intent.ACTION_CALL, Uri.parse(number));
startActivity(c1);它发送完美的dtmf就像这样。delay)+3+(2 2+(2秒秒延迟)+3。
但我想消除2秒的延迟或者控制那个延迟。
如何控制(2秒延迟)?或者其他在通话中发送dtmf音频的方法?
发布于 2012-06-23 04:31:19
若要删除延迟,请删除逗号。
发布于 2013-10-10 06:07:26
试试这个方法()。
private void call(int profileid) {//call procedure logic
ProfileDo profile = adapter.getProfile(profileid);
if (profile.getStepCount() == 0) {
Toast.makeText(getApplicationContext(), "Please edit the profile and add atleast one value to make a call", 10000).show();
return;}
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;
}
startActivity(new Intent("android.intent.action.CALL", Uri.parse(call)));
}希望这能帮到你。
发布于 2013-10-18 00:56:17
试试这个:
Intent signalIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:12334566778"+","+","+"1"));
startActivity(signalIntent);https://stackoverflow.com/questions/11166752
复制相似问题