The documentation for the ToneGenerator class clearly states that it
is for the purpose of generating tones on the near end. This is so the
user hears the tones when they push the digits on the keypad.

If you want to generate DTMF tones on the far end, you need to use the
PhoneManager API.

On Nov 30, 5:12 am, legerb <[EMAIL PROTECTED]> wrote:
> This actually didn't work on the real device.
> The tones can be heard playing on the handset, but not at the
> destination end.
> Using STREAM_VOICE_CALL did sound logic, but it doesn't work, and in
> that case i don't understand the purpose of it.
>
> On Nov 6, 12:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Did this actually work ?
>
> > Did you try this on a real device ?
> > (we dont have access to G1 devices here in Israel)
>
> > TIA
>
> > On Oct 5, 2:36 pm, legerb <[EMAIL PROTECTED]> wrote:
>
> > > I'm trying to send DTMF tones during outgoing call this way in my
> > > PhoneStateListener.
> > > Is this the right way to send DTMF - using the STREAM_VOICE_CALL.
> > > Also i want to send the DTMF sequence after the call is answered, so
> > > CALL_STATE_OFFHOOK doesn't seem to be right, what should be the
> > > appropriate state for sending?
>
> > >         public void onCallStateChanged(int state, String incomingNumber) {
> > >                 // TODO Auto-generated method stub
> > >                 super.onCallStateChanged(state, incomingNumber);
>
> > >                 switch (state)
> > >                 {
> > >                         case TelephonyManager.CALL_STATE_OFFHOOK:
>
> > >                         ToneGenerator toneGenerator = new
> > > ToneGenerator(AudioManager.STREAM_VOICE_CALL,
> > > ToneGenerator.MAX_VOLUME>>1);
> > >                         
> > > toneGenerator.startTone(ToneGenerator.TONE_DTMF_1);
> > >                         toneGenerator.stopTone();
> > >                         
> > > toneGenerator.startTone(ToneGenerator.TONE_DTMF_2);
> > >                         toneGenerator.stopTone();
> > >                                 break;
> > >                 }
>
> > >         }
>
> > > On Oct 2, 11:02 am, legerb <[EMAIL PROTECTED]> wrote:
>
> > > > Is it possible to make a call and then send DTMF sequence in android
> > > > sdk 1.0?
> > > > I've seen the ToneGenerator and PhoneNumberUtils classes, but couldn't
> > > > find an option of sending DTMF...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to