问题
I want to implement Answer call functionality in Android Nougat. The answer call is not supported in Google Nexus 5x.
We tried using the code
Runtime.getRuntime().exec("input keyevent " + Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK));
The answer call is supported in Google Nexus 6 using the above code.
Has anyone worked on the above?
Thanks!
回答1:
There is a security patch that is added as an update on many devices above 5.0 from November 2016 onwards, after updating the devices with this November or later updates, will stop this Runtime method to work.
来源:https://stackoverflow.com/questions/40673922/regd-support-of-answer-call-in-android-nougat