A Almog Active Member Licensed User Nov 16, 2018 #1 hello, It is possible for action to happen when the volume is changed not by (my) app? for example, when the user click on volume up button, a message box will pop up? (whether the app is open or closed)? Thanks in advance.
hello, It is possible for action to happen when the volume is changed not by (my) app? for example, when the user click on volume up button, a message box will pop up? (whether the app is open or closed)? Thanks in advance.
R ronell Well-Known Member Licensed User Longtime User Nov 17, 2018 #2 when you're in the app. yes it is simple without the app in foreground.. try using service to intercept and consume the event ( dont know if it is possible ) Upvote 0
when you're in the app. yes it is simple without the app in foreground.. try using service to intercept and consume the event ( dont know if it is possible )
Computersmith64 Well-Known Member Licensed User Longtime User Nov 17, 2018 #3 You should be able to do it with a Broadcast Receiver that handles the ACTION_MEDIA_BUTTON intent. There is a Broadcast Receiver tutorial here. You should be able to find out more about ACTION_MEDIA_BUTTON intents by asking Mr Google. - Colin. Upvote 0
You should be able to do it with a Broadcast Receiver that handles the ACTION_MEDIA_BUTTON intent. There is a Broadcast Receiver tutorial here. You should be able to find out more about ACTION_MEDIA_BUTTON intents by asking Mr Google. - Colin.
A Almog Active Member Licensed User Nov 17, 2018 #4 ronell said: when you're in the app. yes it is simple without the app in foreground.. try using service to intercept and consume the event ( dont know if it is possible ) Click to expand... Computersmith64 said: You should be able to do it with a Broadcast Receiver that handles the ACTION_MEDIA_BUTTON intent. There is a Broadcast Receiver tutorial here. You should be able to find out more about ACTION_MEDIA_BUTTON intents by asking Mr Google. - Colin. Click to expand... Thank you Upvote 0
ronell said: when you're in the app. yes it is simple without the app in foreground.. try using service to intercept and consume the event ( dont know if it is possible ) Click to expand... Computersmith64 said: You should be able to do it with a Broadcast Receiver that handles the ACTION_MEDIA_BUTTON intent. There is a Broadcast Receiver tutorial here. You should be able to find out more about ACTION_MEDIA_BUTTON intents by asking Mr Google. - Colin. Click to expand... Thank you