Custom moodle app no sound on incoming push messages (iOS)

Custom moodle app no sound on incoming push messages (iOS)

by Romeo S -
Number of replies: 3

Hello there!

I've successfully built a custom moodle mobile app and setup my own AirNotifier server.  I did a git clone of the the Moodle fork (moodle2 branch):

https://github.com/moodlehq/airnotifier/tree/moodle2

The push messages arrived almost instantly withoutany issues, however I've noticed that there was no sound or vibration (iOS / iPhone 6 Plus).  I then did some research and changed the AirNotifier code as follows:

/api/push.py - line 52

change

data.setdefault('sound', None)

to

data.setdefault('sound', 'default')

...and now the push messages correctly trigger a sound and vibration alert.  Did I discover a potential bug or maybe I missed something else during the setup?  I am using Moodle 3.1.1 and the latest Moodle Mobile release 3.1.2.

Many thanks!

Average of ratings: -
In reply to Romeo S

Re: Custom moodle app no sound on incoming push messages (iOS)

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Romeo,

I think you've found (and fixed) a bug, I remember that we took a look to this but we thought that the problem was in the push-plugin (not the server). See MOBILE-1496

We'll fix that in the Airnotifier server soon

Thanks again, Juan

In reply to Juan Leyva

Re: Custom moodle app no sound on incoming push messages (iOS)

by Romeo S -

Hi Juan,

Super, I am glad I was able to help!  Thanks for your much appreciated work!

Kind regards,
Romeo

In reply to Romeo S

Re: Custom moodle app no sound on incoming push messages (iOS)

by Michael Vangelovski -
Picture of Plugin developers

Hi Romeo,

I am experiencing this exact issue. I'm using a more recent Airnotifier and it looks to correctly set "sound": "default"

Has this problem returned for you at all?

Kind regards,
Michael