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.28k stars 452 forks source link

termux-toast does not show #229

Open kai-dj opened 5 years ago

kai-dj commented 5 years ago

All termux-api commands are working for me – but not termux-toast. Executing termux-toast "some text" runs and gives exit code 0, but no toast message appears.

$ termux-toast "hello world!"`
$ echo $?
0

I modified source, so an error message is logged, when the toast panel should appear:

# logcat -d >logcat_toast.log – watch for "toast" tag – nothing seems to relate to the toast… (besides the manualy added log of cource).

My device is a huawei honor 6x (BLN-L21) – android 7.0 nougat. Same issue when I install termux and termux-api from play store or fdroid. termux-api package is installed, all kinds of permissions granted…

Grimler91 commented 5 years ago

Works for me on arm android 7.1. Is the honor 6x an arm or aarch64 device? screenshot_20181030-195322

kai-dj commented 5 years ago

It worked on my old phone, too… ¯\_(ツ)_/¯ Kernel: aarch64 Linux 4.1.18-gbb5634e3

kai-dj commented 5 years ago

Any idea, how I could find information about why it doesn't work for me (and eventually fix this)?

vinhjaxt commented 5 years ago

Are you installed Termux:API app at Google Play Store?

kai-dj commented 5 years ago

I had installed it with Play Store, aswell as via F-Droid. Now all's build from source. Same every way installed.

(No I never mixed installation sources – i.e. no Termux installed from Play Store, Termux Api from F-Droid)

Grimler91 commented 5 years ago

Searching the worldwideweb for "honor 6 toast not working" gives me this issue: https://github.com/farkam135/GoIV/issues/692, this thread https://forum.xda-developers.com/mate-8/help/mate-8-android-7-nougat-toast-messages-t3557139 (and some more). Those issues are for honor 8 though, but might be related to this issue.

Edit: the description doesn't match your issue perfectly though, they seem to only happen if the user is in another app.

kai-dj commented 5 years ago

Maybe I'll try a factory reset. I'd also be willing to down or upgrade android (though officially Oreo is only available for China and India), try custom roms etc.. Since I don't have any problems besides this and flashing roms = risking bricked phone I'd rather try other workarounds first. For now I use termux-notification, but it's not ideal for some usecases…

kai-dj commented 5 years ago

Made a tasker profile, that shows a toast on intent, triggering intent with script aliased as toast. Still I'd love to know why toast isn't working for me…