Bug 409657

Summary: Add buttons in the plasmoid to send keys (next, previous, pause, play, volume+, volume-)
Product: [Applications] kdeconnect Reporter: Raphaël Jakse <raphael.kde>
Component: plasmoidAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: wishlist CC: matthijstijink, nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Raphaël Jakse 2019-07-09 19:23:43 UTC
Hello,

sometimes, I use the phone to play music, and I am using the computer. It would be nice to be able to skip, pause and resume the current song or go to the previous one, and control the volume from the plasmoid to the phone. Buttons could be added at the top of the phone item in the plasmoid for instance.

If you find that this might bloat the UI, maybe it could be configurable and disabled by default?

Other button that could be useful: power (so the screen can be turned on / off from the computer).
Comment 1 Matthijs Tijink 2019-07-10 17:23:37 UTC
You can already control the phone's music using the "kcapp" application (it's experimental though, so it might not currently be packaged for your distribution).

In the future, we expect to enable MPRIS controls for it too, so it can be controlled like other media players on your desktop. There's no timeline for this though.

Regarding turning the screen on/off: what would you use it for? I'm not entirely sure this is even possible in Android.
Comment 2 Raphaël Jakse 2019-07-10 17:41:06 UTC
> You can already control the phone's music using the "kcapp" application (it's experimental though, so it might not currently be packaged for your distribution).

Indeed it is not. But it is great to know!

> In the future, we expect to enable MPRIS controls for it too, so it can be controlled like other media players on your desktop. There's no timeline for this though.

Nice :-)

Another idea I had when writing this bug report: music often can be controlled by touching buttons on a notification. More generally, some apps have buttons in their notifications. Would it be worth to be able to activate them from KDEConnect?


> Regarding turning the screen on/off: what would you use it for? I'm not
entirely sure this is even possible in Android.

To scare my neighbors :-) I don't remember why I mentioned this. This would probably not be a killer feature.

This is certainly possible since scrcpy does provide this feature. The screen is turned on when scrcpy is run, or when the screen is right-clicked on the computer. Turning the screen off is also possible by pressing a key on the keyboard. See https://github.com/Genymobile/scrcpy/#shortcuts

It's probably done by sending KEYCODE_POWER, KEYCODE_WAKEUP or KEYCODE_SLEEP to the device (https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_WAKEUP).
Comment 3 Matthijs Tijink 2019-07-12 19:03:41 UTC
> Another idea I had when writing this bug report: music often can be controlled by touching buttons on a notification. More generally, some apps have buttons in their notifications. Would it be worth to be able to activate them from KDEConnect?

That should already work. Please open another bug if it does not.
Comment 4 Raphaël Jakse 2019-07-14 14:59:23 UTC
Indeed, I haven't found a way to interact with the VLC notification.
I will open a new bug for that.

Feel free to close this bug  :-)
Comment 5 Nicolas Fella 2019-07-29 21:05:37 UTC
The upcoming 1.4 release has a UI for controlling media on the phone