keithfry
2011-04-14 14:53:11 UTC
I've read that it does not seem possible to play audio files while in
a phone call. However, I'd like to have an application play a DTMF
tone during a phone call. There shouldn't be any hw restriction on
this as the dial pad does this already when you press one of the
number keys. Instead I would like to have an application play this
tone automatically without requiring the user to touch the screen. An
example use case would be to recognize when the user has called their
voicemail number and automatically play the tones required to enter
their security code then begin listening to messages.
I've tried using the AudioManager.requestAudioFocus() to get access to
the voice call stream (AudioManager.STREAM_VOICE_CALL) but it always
returns REQUEST_FAILED. I can play the tone using ToneGenerator
without requesting audio focus, but it doesn't play over the voice
call just over the headset speaker.
Any suggestions?
a phone call. However, I'd like to have an application play a DTMF
tone during a phone call. There shouldn't be any hw restriction on
this as the dial pad does this already when you press one of the
number keys. Instead I would like to have an application play this
tone automatically without requiring the user to touch the screen. An
example use case would be to recognize when the user has called their
voicemail number and automatically play the tones required to enter
their security code then begin listening to messages.
I've tried using the AudioManager.requestAudioFocus() to get access to
the voice call stream (AudioManager.STREAM_VOICE_CALL) but it always
returns REQUEST_FAILED. I can play the tone using ToneGenerator
without requesting audio focus, but it doesn't play over the voice
call just over the headset speaker.
Any suggestions?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en