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