Reputation: 777
I am sending dtmf tone via this code.
String number="tel:+962791212121,2,3,3";
Intent c1= new Intent(android.content.Intent.ACTION_CALL, Uri.parse(number));
startActivity(c1);
It send perfect dtmf as this. 2+(2 sec delay)+3+(2 sec delay)+3.
but I want to remove that 2 sec delay or I want to control that delay.
How can I control (2 sec delay)? Or any other method to send dtmf tone during call?
Upvotes: 2
Views: 1679
Reputation: 1
Try this:
Intent signalIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:12334566778"+","+","+"1"));
startActivity(signalIntent);
Upvotes: 0
Reputation: 353
Try this method().
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)));
}
Hope this helps you .
Upvotes: 0