这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@AgentConDier
Copy link
Contributor

@AgentConDier AgentConDier commented Aug 24, 2019

By default, editing a notification creates no alert, so alert-once had no effect. Changed to flag alert-always that sets alert-once to false if present. (Defaults to true in https://github.com/termux/termux-api/blob/master/app/src/main/java/com/termux/api/NotificationAPI.java#L80)

By default, editing a notification creates no alert, so alert-once had no effect. Changed to flag alert-always that sets alert-once to false if present.
Fixes 'unrecognized option: led-color' errors
(Unable to test; led and vibration have never worked for me [Android 9; EMUI 9.1.0])
@xalexalex
Copy link
Contributor

xalexalex commented Aug 24, 2019

Hey,
Thanks for spotting this, there's indeed a problem with --alert-once. However, I think that for transparency with the Android method (setOnlyAlertOnce()) and in compliance with Android's default (false, at least on my device), the change should be made in https://github.com/termux/termux-api/blob/master/app/src/main/java/com/termux/api/NotificationAPI.java#L80, by setting the default to false.

Regarding the second commit and the missing comma, that's also a nice catch!

@xalexalex
Copy link
Contributor

Merged the second commit. Closing.
Again, thanks @AgentConDier !

@xalexalex xalexalex closed this Aug 24, 2019
xalexalex added a commit to termux/termux-api that referenced this pull request Aug 25, 2019
Because the default should be false, and in termux-api-package the
--alert-once flag can be used to set it to true.

Thanks to AgentConDier for spotting this.

Fixes termux/termux-api-package#83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants