Sending DTMF tones in between outgoing call create call in 3 way mode in android -
when outgoing call event fire, after sometime call sending dtmf tones, when dtmf tones send, previous call going hold , new call generated, , generate 3 way calling in android.
can call not generate 3 way code?
code of sending dtmf is:
tonegenerator tone = new tonegenerator(audiomanager.stream_dtmf,tonegenerator.max_volume >> 1); tone.starttone(tonegenerator.tone_dtmf_1); tone.starttone(tonegenerator.tone_dtmf_2); tone.starttone(tonegenerator.tone_dtmf_3); tone.starttone(tonegenerator.tone_dtmf_4); tone.starttone(tonegenerator.tone_dtmf_5); tone.starttone(tonegenerator.tone_dtmf_6); tone.starttone(tonegenerator.tone_dtmf_7); tone.starttone(tonegenerator.tone_dtmf_8); tone.starttone(tonegenerator.tone_dtmf_9); tone.starttone(tonegenerator.tone_dtmf_p); tone.starttone(tonegenerator.tone_dtmf_s); tone.stoptone(); concatenate_tonevalue = ("tel://"); (i = 0; < j; i++) { value = string.valueof(param.charat(i)); try { parsetonevalue = integer.parseint(value); } catch (exception e) { // todo: handle exception } tonea = tonegenerator.tone_dtmf_0; toneb = tonegenerator.tone_dtmf_1; tonec = tonegenerator.tone_dtmf_2; toned = tonegenerator.tone_dtmf_3; tonee = tonegenerator.tone_dtmf_4; tonef = tonegenerator.tone_dtmf_5; toneg = tonegenerator.tone_dtmf_6; toneh = tonegenerator.tone_dtmf_7; tonei = tonegenerator.tone_dtmf_8; tonej = tonegenerator.tone_dtmf_9; tonek = tonegenerator.tone_dtmf_p; tonel = tonegenerator.tone_dtmf_s; /* compare dialed value tone generator value */ if (parsetonevalue == tonea) { concatenate_tonevalue += string.valueof(tonea) + ","; } else if (parsetonevalue == toneb) { concatenate_tonevalue += string.valueof(toneb) + ","; } else if (parsetonevalue == tonec) { concatenate_tonevalue += string.valueof(tonec) + ","; } else if (parsetonevalue == toned) { concatenate_tonevalue += string.valueof(toned) + ","; } else if (parsetonevalue == tonee) { concatenate_tonevalue += string.valueof(tonee) + ","; } else if (parsetonevalue == tonef) { concatenate_tonevalue += string.valueof(tonef) + ","; } else if (parsetonevalue == toneg) { concatenate_tonevalue += string.valueof(toneg) + ","; } else if (parsetonevalue == toneh) { concatenate_tonevalue += string.valueof(toneh) + ","; } else if (parsetonevalue == tonei) { concatenate_tonevalue += string.valueof(tonei) + ","; } else if (parsetonevalue == tonej) { concatenate_tonevalue += string.valueof(tonej) + ","; } else if (parsetonevalue == tonek) { concatenate_tonevalue += string.valueof(tonek) + ","; } else if (parsetonevalue == tonel) { concatenate_tonevalue += string.valueof(tonel) + ","; } } uri uri = uri.parse(concatenate_tonevalue + tonegenerator.tone_dtmf_p); myactivity activity = new myactivity(); activity.finish(); intent = new intent(intent.action_call, uri); startactivity(i); return false; }
Comments
Post a Comment