Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some changes to foreground notification (channel) #33

Merged
merged 1 commit into from
Dec 22, 2018

Conversation

ialokim
Copy link
Contributor

@ialokim ialokim commented Dec 16, 2018

As already pointed out in #30, it is not possible on Android 8+ to set a minor priority to the foreground notification. But then, you are at least able to change the priority by hand (or even turn the notification completely off). On devices using API versions below 26, this fine-grained settings are not available to the user. Fortunately, in this case the restrictions mentioned above do not apply so when setting the priority on the notification itself to minimal it does have the effect of neither showing the notification on lockscreen nor the icon in the status bar.

By setting .setWhen(0), the notification gets ordered at the bottom (at least on all phones I have tested) and foreground.setShowBadge(false) simply omits the foreground notification on the homescreen.

@jmattheis jmattheis self-requested a review December 22, 2018 10:43
Copy link
Member

@jmattheis jmattheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

The ordering doesn't work on my device (Huawei) with android 7. It seems like all foreground notifications are grouped at the top. Still, it doesn't make anything worse, so I'm okay with merging it.

@jmattheis jmattheis merged commit 95aa9b3 into gotify:master Dec 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants