Skip to content

Support Samsung Air Actions

Fedor Ihnatkevich requested to merge Jeffset/vlc-android:air-actions into master

Description

Currently standard media session shortcuts are used for VLC on Samsung devices that support S Pen, because VLC implements media session. But they do not support 10 sec rewind/fast forward, so support them directly. As explicitly supporting actions disables other shortcuts for media session, explicitly support the rest as well.

All is done according to Samsung specs from https://developer.samsung.com/galaxy-spen-remote/air-actions.html

Also it needs to be mentioned, that according to Samsung policy, every app that supports air commands has them disabled by default in settings if the app is not issued a special id by Samsung. If we decide to merge this feature-request, we probably can obtain this key for VLC properly either in this CL or have it done separately and make an issue for that. See their FAQ here - look for Q5.

Motivation and Context

When Samsung Android devices' users use S Pen as a remote control for the player, it's convenient to be able to seek back and forth remotely without the need to pick up the device. Special target cases are those when screen cast is used.

How Has This Been Tested?

I've tested these changes on Samsung Galaxy Tab S7 and verified that all xml resources are written according with aforementioned specs.

If explicit support for VLC air commands is disabled in settings (it is by default for now, see above) the standard media session shortcuts continue to works, so this is 100% opt-in feature for all users.

As this is implemented just as additional metadata declared in AndroidManifset.xml for which Samsung devices may look, it's basically no-op for any other device and can't break anything.

Screenshots / GIFs (if appropriate):

This is the air menu looks with the patch: screen Air actions's settings section that appeared for VLC: Screenshot_20201026-012255_Air_command

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING section of the README document.
Edited by Fedor Ihnatkevich

Merge request reports