media control "resume" and "pause" via NFC tag do not work
3
votes
0
answers
527
views
# Problem description
I wrote tasks onto NFC tags
* to play different playlists in a media player app,
* to control the media player (Vol +/-, next/previous title, pause/resume, quit media player) and
* to shut down the smartphone.
Starting the media player playing a certain playlist works fine. All media control commands/tasks **work fine except for "pause", "resume" and "pause/resume"**. Quitting the media player (with root permissions) and shutting down the smartphone work.
**The smartphone recognizes these commands/tasks** and prints them to the display when a NFC tag with one of these commands written onto it is held onto the smartphone's NFC reader. However, the **currently running music is not paused and paused music is not resumed**. There is no difference between running the media player in the background or in the foreground.
# Question
What might cause this issue and how can I solve it?
# Technical Details
* **OS:** Lineage OS 17.1 official (Android 10)
* **device:** Galaxy A3 2016
* **media player app:** VLC Media player (but also tested Foldplay, Vanilla Music, mMusic Mini, Audify Music, AOSP Music+, Schlichter Music-Player, Simple Music Player, Lineage OS Music Player 3.0).
* **NFC Writer Apps:** MacroDroid (root permissions), NFC Tools PRO (default user permissions)
* **tried these NFC tag writers as well** (but they could not write *media control* commands onto NFC tags)**:** NFC TagWrite by NXP, NFC Writer by Trigger, NFC/RF Reader and Write (by GreenlifeiInfo Tech), NFC-Tags write and read (by Yalintech), NFC Tag Writer & Reader (by Winning Studios Apps)
* can be **reproduced** on **same smartphone model** with **Lineage OS 19.1 unofficial** (Android 12) without any root permissions
# Some other details
I am setting up a "music box" for my child similar to a [Tony Box](https://tonies.com/en-gb/) based on a Galaxy A3 2016. This music box should be controlable by NFC tags - except for turning the smartphone on. Most tasks are written via the MacroDroid App which has root priviledges. "pause/resume" neither works when written via MacroDroid (root) nor when written via NFC Tasks Pro (without root priviledges).
The display briefly flickers if a "media control pause/resume/pause-or-resume" command/task is issued via a NFC tag. But, nothing else happens except ... [see next paragraph].
If I play an audio file in the LineageOS Music Player by tabbing onto the file in the file browser, a minimal version of the player appears. If I hold a "media control: pause" tag onto the smartphone's NFC readern then the app is killed. However, this does not happen when I start the LineageOS mediaplayer manually and start playing audio files from within the player. This happens with no other player.
/edit:
# What I tried so far to solved this issue
* tried nine different music players
* looked for (and tried) different NFC writer apps; however, most of the NFC writer apps do not allow writing media control tasks
* searched via my favorite search machine for my problem:
* the search results are related to old problems more then five years ago and, hence, target old android versions
* often all media control commands are affected
* only some apps are affected (e.g. [here](https://www.reddit.com/r/tasker/comments/d43kt0/help_media_control_toggle_pause_not_working_on/))
* tried another version of LineageOS
* tried a smartphone with a freshly installed OS
Asked by daniel.heydebreck
(131 rep)
Jul 18, 2022, 09:32 PM
Last activity: Jul 18, 2022, 09:40 PM
Last activity: Jul 18, 2022, 09:40 PM