How to answer a call programatically.
I have tried to implement the below code using TelephonyManager.
TelephonyManager tm = (TelephonyManager) mContext
        .getSystemService(Context.TELEPHONY_SERVICE);
if (tm == null) {
    // whether you want to handle this is up to you really
    throw new NullPointerException("tm == null");
}
tm.answerRingingCall();
But, It is not working. Is there any other ways to do the same.
 
    