Good skill, I already have some experience in this domain (answer call function and autoanswer for android ), I can tell you that isn't a universal solution for all android versions. I have implemented this function later but I test it jut for some devices.
Contact me, show me you implementation, I studied this question for a long time, I think I can help you.