Hi,

I found the following code:-

TelephonyManager tm = (TelephonyManager)
getSystemService(TELEPHONY_SERVICE);
                Class c = Class.forName(tm.getClass().getName());
                Method m = c.getDeclaredMethod("getITelephony");
                m.setAccessible(true);
                ITelephony telephonyService;
                telephonyService = (ITelephony)m.invoke(tm);

                // Silence the ringer and answer the call!
                telephonyService.silenceRinger();
            *    telephonyService.answerRingingCall();*

But this code works only on Android 2.2. It is not working in android 2.3+

Have you tried any code other than this.

Thanks,
Iniyan P

On Sun, Jul 1, 2012 at 11:13 AM, rambabu mareedu
<[email protected]>wrote:

> better thing ask to google you can find easily
>
> On Sun, Jul 1, 2012 at 9:34 PM, Iniyan P <[email protected]> wrote:
>
>> Can anyone please throw some light on this.
>>
>> Thanks,
>> Iniyan P
>>
>> On Sat, Jun 30, 2012 at 12:02 PM, Iniyan P <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> I was browsing through Android site and stackoverflow for getting
>>> automatically answering the phone call code.
>>>
>>> I found the code and it is working in android 2.2.
>>>
>>> It is not working in Android 2.3+.
>>>
>>> From the stackoverflow  " Any code you have that requires
>>> MODIFY_PHONE_STATE will work all the way up to (and including) Android 2.2,
>>> but will break for Android 2.3+."
>>>
>>> So Is there anyother way I can find a code that will work on android 2.3+
>>>
>>> Thanks,
>>> Iniyan P
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Regards
> Rambabu Mareedu
> 9581411199
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to