How can I detect long pressed volume and power button when app is in background on Android P using service
问题 I want to detect volume button press when app is in background and even if device is locked I am working on android P, I was able to get long pressed volume button when app is in background but screen not locked using service and by getting Allow over other apps permission but it caused problem , when app is in background back button and keyboard are not working , I am able to open other apps like whatsapp but I can not type a message and can not back , Here is my code any please help .