Tag: Cal problem run DBR SSI exe EXE event put
Cause: Android was able to listen silently via aidl. But after 5.0 has been blocked by Google. This is the only way we can achieve this. How to resolve:
try { runtime.getruntime (). EXEC ("input keyevent" + integer.tostring (Keyevent.keycode_headsethook)); } catch (IOException e) { //runtime.exec (String) had an I/O problem, try to fall back String enforcedperm = "Androi D.permission.call_privileged "; Intent Btndown = new Intent (Intent.action_media_button). PutExtra ( intent.extra_key_event, New KeyEvent ( Keyevent.action_down, Keyevent.keycode_headsethook)); Intent btnup = new Intent (Intent.action_media_button). PutExtra ( intent.extra_key_event, New KeyEvent ( KEYEVENT.ACTION_UP, Keyevent.keycode_headsethook)); Mcontext.sendorderedbroadcast (Btndown, enforcedperm); Mcontext.sendorderedbroadcast (Btnup, enforcedperm); }
The simple thing is to send a headset to press the Listen event. Deception System.
[Android] Android5.0 implementation of Silent answer call function