4

I've never asked questions - always could find the stuff, but this time I really don't know, even where to dig.

I trying to mute incoming uplink stream (while calling to smb) and play sound at this time via phone-call-speaker.

No problem with playing the sound but with muting stream, it is. Here what I've tried:

1) Java Reflection to call methods of an internal class of Android Telephony.

Here is the authors blog (Prasanta Paul) : http://prasanta-paul.blogspot.com/2010/09/call-control-in-android.html And his widget: http://code.google.com/p/phoneaway/

I've tried to modify commented features in ITelephony.aidl to mute call stream, but it didn't work - "no such procedure..."

2) getting to stream over AudioManager

audioManager.setStreamMute(AudioManager.STREAM_SYSTEM, true);
audioManager.setStreamMute(AudioManager.STREAM_VOICE_CALL, true);
audioManager.setStreamMute(AudioManager.STREAM_DTMF, true);
audioManager.setStreamMute(AudioManager.STREAM_ALARM, true);
audioManager.setStreamMute(AudioManager.STREAM_NOTIFICATION, true);
audioManager.setStreamMute(AudioManager.STREAM_RING, true);

and

audioManager.setStreamSolo(AudioManager.STREAM_MUSIC, true);

This do not do nothing to uplink call stream. Even on rooted phone.

3) There are few articles and jar's on the net about implementing hidden API. No articles to answer how to mute phone call stream.

There are a lot apps that uses some undocumented features and features that requires root access. I really wonder how people found this hidden features and how to use them. I haven't found any of them to mute stream.

Android ver: 2.2

Device: Samsung i5500

If you have any idea how to implement muting phone call - please answer.

P.S.: If subj is impossible on standard phone, please say how to do that with root access

Kara
  • 6,115
  • 16
  • 50
  • 57
Inoy
  • 1,065
  • 1
  • 17
  • 24
  • Would you like to clarify what you mean by "incoming uplink stream"? I would have expected "uplink" to mean the phone to base station direction, but incoming to mean that the destination is the phone. Perhaps you mean that this is an incoming call (someone else called the user's Android phone), and you are interested in muting the uplink stream (e.g., turning off the microphone or otherwise ensuring the caller cannot hear the user's voice; i.e., muting the audio channel from the local user to the caller). Is that the idea? – D.W. Jan 30 '14 at 21:56
  • did u gave permission to access audio device in android manifest? – Prabhu Prabhakaran Jan 31 '14 at 06:24
  • @prabhuprabhakaran I gave MODIFY_AUDIO_SETTINGS and PROCESS_OUTGOING_CALLS permissions. What did you mean by "permission to access audio device"? – Inoy Feb 01 '14 at 23:08
  • @D.W. no, the idea is to mute incoming call stream – Inoy Feb 02 '14 at 08:58
  • Could you please try like this.. `AudioManager.setMode(AudioManager.MODE_IN_CALL); AudioManager.setStreamSolo(AudioManager.STREAM_VOICE_CALL, true);` then remove it later by `AudioManager.setStreamSolo(AudioManager.STREAM_VOICE_CALL, false); AudioManager.setMode(AudioManager.MODE_NORMAL );` – Prabhu Prabhakaran Feb 04 '14 at 07:40
  • @prabhuprabhakaran Already tried setStreamSolo (_under #2 in question post_). Please try before posting – Inoy Feb 04 '14 at 10:54

0 Answers0