Sameer Zinzuwadia
Sameer Zinzuwadia

Reputation: 3285

Android disturbance in ongoing call

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:

  1. 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);
    
  2. 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

  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

Answers (1)

Luminger
Luminger

Reputation: 2194

It seems you have the same problem I had a while ago: With Android 2.3 aka Gingerbread it's no longer possible to use the ITelephony interface because the MODIFY_PHONE_STATE permission has been marked system only.

Details may be found here.

Upvotes: 1

Related Questions