Media buttons recognize only on screen on
Moderator: Martin
-
- Posts: 42
- Joined: 17 Sep 2019 08:30
Re: Media buttons recognize only on screen on
@Martin help me please, how to check why media forward button not recognize when screen off, and when on all OK?
Re: Media buttons recognize only on screen on
Hi,
Android might give the precedence to the app that last played a sound. You could check if Android informs Automagic again when you use an action 'Sound' to play a short sound when the screen turned off.
Please also check the battery optimization settings in your device settings. Some devices use aggressive battery optimization and suspend apps when the screen turns off.
Regards,
Martin
Android might give the precedence to the app that last played a sound. You could check if Android informs Automagic again when you use an action 'Sound' to play a short sound when the screen turned off.
Please also check the battery optimization settings in your device settings. Some devices use aggressive battery optimization and suspend apps when the screen turns off.
Regards,
Martin
-
- Posts: 42
- Joined: 17 Sep 2019 08:30
Re: Media buttons recognize only on screen on
Thanks so much, I will try with the sound hope it helps
-
- Posts: 42
- Joined: 17 Sep 2019 08:30
Re: Media buttons recognize only on screen on
But how to fix the situation when I want to call my assistant realized on automagic when playing music in the car over bluetooth device and I tap on the forward button, and I want to hook this button action and automagic must pause music and start my assistant, other Bluetooth buttons may work without automagic actions simply control audio playing.?Martin wrote: ↑21 Dec 2019 10:40Hi,
Android might give the precedence to the app that last played a sound. You could check if Android informs Automagic again when you use an action 'Sound' to play a short sound when the screen turned off.
Please also check the battery optimization settings in your device settings. Some devices use aggressive battery optimization and suspend apps when the screen turns off.
Regards,
Martin
Re: Media buttons recognize only on screen on
@Sergey_777-s : Use trigger Media button event and choose specific event - Fast Forward. So Automagic only intercept this button only. Add action Control Audio Player, choose the app if necessary, and Pause. Then action Voice search and put your prompt. Or you can use launch app too, to open Gass directly.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 42
- Joined: 17 Sep 2019 08:30
Re: Media buttons recognize only on screen on
This works with screen on, when off I need to make sound using automagic for intercept the forward key,(for get focus) as Martin says but I need do this when music is playing and can't because when screen off aimp intercepting all key press. I want to believe that exists normal way for intercept bluetooth keys with screen off and then send it to player or make other ations
Re: Media buttons recognize only on screen on
It is quite difficult to intercept other music playing app. Do you have root for this device? If yes, then you can use logcat and filter for the bluetooth event. You got to test it out at the PC using adb logcat first, for easier searching. At mine, when I press bluetooth forward button, it shows these line
I can then filter this in the trigger Command Output and trigger the flow even though the media button event is still sent to the music player.
If you have no root, you have to wait for AM 1.38 released, as it has the read log permission, which can execute logcat without root.
Code: Select all
NewAvrcpNativeInterface: sendMediaKeyEvent: keyEvent=75 pushed=true
NewAvrcpTargetService: getMediaKeyEvent: event=75 pushed=true
NewAvrcpMediaPlayerList: sendMediaKeyEvent: key=75 pushed=true
If you have no root, you have to wait for AM 1.38 released, as it has the read log permission, which can execute logcat without root.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 42
- Joined: 17 Sep 2019 08:30
Re: Media buttons recognize only on screen on
Yes I have a root access, thanks for output example, I will try to catch event with off screenDesmanto wrote: ↑28 Dec 2019 19:57It is quite difficult to intercept other music playing app. Do you have root for this device? If yes, then you can use logcat and filter for the bluetooth event. You got to test it out at the PC using adb logcat first, for easier searching. At mine, when I press bluetooth forward button, it shows these lineI can then filter this in the trigger Command Output and trigger the flow even though the media button event is still sent to the music player.Code: Select all
NewAvrcpNativeInterface: sendMediaKeyEvent: keyEvent=75 pushed=true NewAvrcpTargetService: getMediaKeyEvent: event=75 pushed=true NewAvrcpMediaPlayerList: sendMediaKeyEvent: key=75 pushed=true
If you have no root, you have to wait for AM 1.38 released, as it has the read log permission, which can execute logcat without root.