dcai / airnotifier

Push Notifications Server for Human Beings.
Other
593 stars 187 forks source link

No sound & vibration on iOS and older Android version (7.0 Nougat) #244

Open bi1101 opened 1 year ago

bi1101 commented 1 year ago

Here's my set up: Airnotifier 3.x Moodle site 4.0.3 Moodle customized app 4.0.2

When I send push notifications from Moodle to the app, there's no sound or vibration on iOS, on modern Android it works fine, but on older android, it doesn't have sound or vibration

I have access and have already tried it with an official Airnotifier from the Moodle team and everything works fine so I think this is a problem with 3.x version of Airnotifier.

sulzer commented 10 months ago

I'm facing the same issue with iOS devices. On newer Android releases it seems to work fine. Have you ever found a solution? It seems the "sound" : "default" is missing in the push payload, however in api\push.py it seems to be defined on line 138: apns_default = {"badge": None, "sound": "default", "push_type": "alert"}

bi1101 commented 10 months ago

The problem is not that simple I'm afraid, there's a heavily custom version that Moodle use, with lots of changes in the code. Unfortunately, this code is not open-sourced. You can try to reverse engineer it from the app code but I had no luck.

sulzer commented 10 months ago

Thanks for your quick response.