termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

`termux-notification --type media` is broken on termux-api v0.50.1

Open FoxeiZ opened this issue 3 years ago • 5 comments

Problem description

All media buttons always use the defined action for --media-previous

Steps to reproduce

termux-notification --type media -t title -c content --alert-once --media-play "termux-toast play" --media-pause "termux-toast pause" --media-next "termux-toast next" --media-previous "termux-toast prev"

Expected behavior

should toast "next" when pressing the next button, "pause" for the pause button, ...

Additional information

  • termux-api application version: 0.50.1+ccacb68
  • termux-api package version (installed through apt): 0.57
  • Android OS version: 12L
  • Device model: M2101K6G
  • Screenshot: screenshot

FoxeiZ avatar Aug 04 '22 03:08 FoxeiZ

Note: This used to work completely fine on termux-api v0.49

FoxeiZ avatar Aug 06 '22 19:08 FoxeiZ

The other options with actions don't work too (on my Android 9 / FireOS): --button1 "a" --button1-action "termux-toast action" --on-delete "termux-toast action" Even in combinaton with "--alert-once" or "--priority high"

`Termux Variables: TERMUX_APP_PACKAGE_MANAGER=apt TERMUX_MAIN_PACKAGE_FORMAT=debian TERMUX_VERSION=0.118.0 Packages CPU architecture: arm Subscribed repositories:

sources.list

deb https://grimler.se/termux/termux-main stable main

x11-repo (sources.list.d/x11.list)

deb https://grimler.se/termux/termux-x11 x11 main Updatable packages: aapt2/stable 12.0.0.27-4 arm [upgradable from: 12.0.0.27-3] aapt/stable 12.0.0.27-4 arm [upgradable from: 12.0.0.27-3] android-tools/stable 31.0.3p1-5 arm [upgradable from: 31.0.3p1-4] apt/stable 2.5.2 arm [upgradable from: 2.5.1] binutils/stable 2.38-1 arm [upgradable from: 2.38] chromaprint/stable 1.5.1-1 arm [upgradable from: 1.5.1] cups/stable 2.3.3-10 arm [upgradable from: 2.3.3-9] ffmpeg/stable 5.1 arm [upgradable from: 5.0.1-2] game-music-emu/stable 0.6.3-1 arm [upgradable from: 0.6.3] googletest/stable 1.12.1-2 arm [upgradable from: 1.12.1-1] harfbuzz/stable 5.1.0-1 arm [upgradable from: 5.1.0] html2text/stable 1:2.1.1-1 arm [upgradable from: 1:2.1.1] libaom/stable 3.4.0-1 arm [upgradable from: 3.4.0] libc++/stable 25-1 arm [upgradable from: 23c] libcaca/stable 0.99.beta20-1 arm [upgradable from: 0.99.beta20] libdb/stable 18.1.40-4 arm [upgradable from: 18.1.40-3] libflac/stable 1.3.4-1 arm [upgradable from: 1.3.4] libgmp/stable 6.2.1-2 arm [upgradable from: 6.2.1-1] libgraphite/stable 1.3.14-2 arm [upgradable from: 1.3.14-1] libicu/stable 71.1-1 arm [upgradable from: 71.1] libp8-platform/stable 2.1.0.1-2 arm [upgradable from: 2.1.0.1-1] libprotobuf/stable 2:3.19.3-1 arm [upgradable from: 2:3.19.3] libtiff/stable 4.3.0-3 arm [upgradable from: 4.3.0-2] libvpx/stable 1:1.12.0-1 arm [upgradable from: 1:1.12.0] libwebrtc-audio-processing/stable 0.3.1-2 arm [upgradable from: 0.3.1-1] libx265/stable 3.5-4 arm [upgradable from: 3.5-3] libzopfli/stable 1.0.3-3 arm [upgradable from: 1.0.3-2] msmtp/stable 1.8.22 arm [upgradable from: 1.8.20] ndk-sysroot/stable 25 arm [upgradable from: 23c] pulseaudio/stable 16.1-2 arm [upgradable from: 16.1-1] taglib/stable 1.12-2 arm [upgradable from: 1.12-1] termux-tools/stable,stable 1.26.0-1 all [upgradable from: 1.26.0] vlc/stable 3.0.17.4-3 arm [upgradable from: 3.0.17.4-2] zstd/stable 1.5.2-2 arm [upgradable from: 1.5.2-1] termux-tools version: 1.26.0 Android version: 9 Kernel build information: Linux localhost 4.14.87+ #1 SMP PREEMPT Tue Jun 28 11:10:12 UTC 2022 armv7l Android Device manufacturer: Amazon Device model: AFTKA `

uwe-007 avatar Aug 13 '22 12:08 uwe-007

This does work:

termux-notification -t "title" --on-delete "am start --user 0 com.ghisler.android.TotalCommander/.TotalCommander" --priority high

So you should modify (?) the action command you are using ...

uwe-007 avatar Aug 13 '22 13:08 uwe-007

The other options with actions don't work too (on my Android 9 / FireOS): --button1 "a" --button1-action "termux-toast action" --on-delete "termux-toast action" Even in combinaton with "--alert-once" or "--priority high"

I have confirmed that this also happened to me as well.

So you should modify (?) the action command you are using ...

What you mean "modify the action"?

FoxeiZ avatar Aug 15 '22 03:08 FoxeiZ

What you mean "modify the action"?

Sorry, I was wrong I thought, this works:

termux-notification -t "title" --on-delete "am start --user 0 com.ghisler.android.TotalCommander/.TotalCommander" --priority high

and this not:

termux-notification -t "title" --on-delete "termux-toast bla" --priority high

But both are working.

uwe-007 avatar Aug 15 '22 11:08 uwe-007