Reputation: 3285
I have create the aidl file ITelephony.aidl
for ending the call. Now before the call should be ended, I need to generate the voice in ongoing call, so that the listener assumes that there is a problem in next work.
I have tried to solve this by myself in three ways:
Control the audio stream volume
audioManager.setStreamMute(AudioManager.STREAM_VOICE_CALL, isMute);
int index = rand.nextInt(5);
audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,index,0);
Another way is using the setMute in telephonyService
http://androidsourcecode.blogspot.in/2010/10/blocking-incoming-call-android.html but working in in 2.3
I have also tried to implement using media player for start playing when the call is going on but no luck. So if there is any other idea then please let me know.
Upvotes: 3
Views: 425