termux / termux-api

Termux add-on app which exposes device functionality as API to command line programs.
https://f-droid.org/en/packages/com.termux.api/
2.33k stars 458 forks source link

termux-notification always plays a sound #319

Open jankratochvil opened 4 years ago

jankratochvil commented 4 years ago

Problem description termux-notification always plays a sound. Its option --sound has no effect. And there is no option --silent.

Steps to reproduce termux-notification -c hello the same as: echo hello|/data/data/com.termux/files/usr/libexec/termux-api Notification

Actual behavior Default notification sound.

Expected behavior No sound.

Additional information

Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
Updatable packages:
termux-auth/stable 1.3 aarch64 [upgradable from: 1.1-1]
Android version:
9
Kernel build information:
Linux localhost 4.4.146 #2 SMP PREEMPT Fri Dec 6 18:02:59 CST 2019 aarch64 Android
Device manufacturer:
Planet
Device model:
Cosmo_Communicator

Not rooted. adb output upon request.

I do not have Android development environment setup to try some simple fix, sorry.

xalexalex commented 4 years ago

I also experienced some minor issues with notification priority and sound but never got around to investigating them. Could you try tweaking termux:API's notification settings in the android settings and seeing whether changing sound/priority there works?

jankratochvil commented 4 years ago

TBH I did not know there is this detailed Android notification setting . Just it follow what I set in Android ignoring what Termux::API sets. This is probably what various suggestions on stackoverflow say. Personally I am fine with it now as I did configure it in Android and not in my Termux shell script. But Termux still could be fixed but I do not have Android development installed.