balzack / databag

fast & lightweight self-hosted messenger
Apache License 2.0
861 stars 45 forks source link

Android notifications not working #57

Open ZedSphere opened 1 year ago

ZedSphere commented 1 year ago

When receiving messages on an Android device (Tested on a Google Pixel 7 Pro) no notification sounds play regardless of "Enable Notification Sounds" being toggled to the "ON" position within the app and app permissions being granted.

balzack commented 1 year ago

There are two places within the app to enable notifications. 1) within the profile screen switch 'enable notifications' to on 2) within the admin dashboard switch 'enable push notifications' to on

Notifications also must be enabled for the app in the OS, but sounds like you already confirmed this.

Notifications only occur when a contact creates a new topic with you, adds a message to a shared topic, or calls you. Notifications won't occur if you just add a message with your account from the browser.

If this still is not working for you, can you tell me more about your setup? Are you using UnifiedPush with ntfy?

Frokkzy commented 8 months ago

notifications don't work for me either

balzack commented 8 months ago

hmmm, it should be working. Are you using anything like fdroid or lineageOS?

Can you create an account with the demo server databag.coredb.org, ad see if that server is able to push notifications to you?

Frokkzy commented 8 months ago

yea lineageOS and f-droid...

Frokkzy commented 8 months ago

I've never had a notification problem with lineageOS and I've tried with your server with two different accounts and still no notification even when I test the audio calls.

balzack commented 8 months ago

I also use lineageOS and notifications with ntfy/UnifiedPush works for me.

There have been reports that notifications don't work with the tor network enabled. I'm not yet sure why; would this be the case for you?

Frokkzy commented 8 months ago

nop i use 4g. maybe there's a problem with the battery management?

Frokkzy commented 8 months ago

normally nothing needs to be changed for it to work ?

balzack commented 8 months ago

Are you using UnifiedPush for notifications?

Google's firebase messaging is not open source, which is required by f-droid. To support push notifications the f-droid build has the integration replaced with UnifiedPush. Let me know if there is an f-droid app that supports push notifications in another way, so I can support that as well.

If you install the google store version of Databag, it should work without UnifiedPush.

Frokkzy commented 8 months ago

I don't have the playstore where can I find this official version?

Frokkzy commented 8 months ago

ok so version 1.1 of F-droid works with notification but you need to install ntfy and then databag not the other way round... is it normal that it's version 1.5 on the play store and 1.1 on f-droid ?

balzack commented 8 months ago

Thanks for staying with this project through the difficulties! It helps me learn where I need to improve the databag service and my communication.

Frokkzy commented 8 months ago

yes putting the apk version on github is really useful when you don't have the playstore.

thank you for creating this free, self-hosted alternative messaging service and keeping it alive.

balzack commented 8 months ago

I added the apk to the latest release: https://github.com/balzack/databag/releases/download/v1.1.11/databag.apk

That one has been manually built. I'll link it to the main readme if I figure out how to build it with a github action.

Thanks for all the feedback!