Firebase Cloud Messaging with custom AirNotifier?

Firebase Cloud Messaging with custom AirNotifier?

by Peter Upfold -
Number of replies: 13

Is there any information or documentation on how Moodle's messages.moodle.net now works with Google's Firebase Cloud Messaging (FCM)? Google Cloud Messaging (GCM) I believe is being deprecated this month, but that remains the service that the AirNotifier fork supports.

We are aware of Moodle's branded app service, but we have the skills in-house to achieve something similar. I have a custom version of the app built, but am struggling to find any information on how to integrate Firebase with a custom instance of AirNotifier(?) and deliver push notifications from Moodle to devices that way.

Thank you for any insight anyone might be able to give.

Average of ratings: -
In reply to Peter Upfold

Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -

Yeah this is... pretty darn important. GCM is going to stop working on the 29th, that's just over 2 weeks. The moodle team has said they'll be updating their fork of airnotifier to work with firebase (they said back in April 2018 they'd do it in "a near future"), so where is it? We really need an update.

It kind of looks like the main airnotifier repo updated their codebase to use FCM, but the documentation doesn't say anything about it and I'm not sure what moodle needs to do to merge those updates into their own fork.

In reply to Grayson Bartlet

Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -

Actually I'm seeing in this ticket that you already updated the app to work with "the new airnotifier"?

Do you guys think you could share this new airnotifier with the class? :P

In reply to Grayson Bartlet

Re: Firebase Cloud Messaging with custom AirNotifier?

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Airnotifier is an open source project available on github:

https://github.com/airnotifier/airnotifier

The Moodle Mobile team are also contributors to this project - if you have a look at the pull requests and branches in github you will likely find what you are looking for... smile

In reply to Dan Marsden

Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -

Ah nice, I didn't realize you guys weren't using your fork any more. I assume 'fcm' is the branch we want, right?

Cheers smile

In reply to Grayson Bartlet

Re: Firebase Cloud Messaging with custom AirNotifier?

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I assume Moodle HQ are using code based on the fcm branch in github but I expect they would also have their own internal private branch based on that code that may have local changes specific to HQ.

In reply to Dan Marsden

Re: Firebase Cloud Messaging with custom AirNotifier?

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

Hi there,

to clarify things:

- Airnotifier is an Open Source project not related or maintained by Moodle, although we are contributors (with code and funding)

- Moodle HQ was very kind to fund the base FCM support in the Airnotifier codebase not only for Moodle but also for other projects using Airnotifier for delivering Push notifications: https://github.com/airnotifier/airnotifier/tree/fcm

- As Dan mentioned, we have some customisations on top of that branch that we can't share for several reasons (communication with internal systems, some custom features for the BMA service, some software adjustments for our system infrastructure, etc...)

- We can guarantee that Airnotifier will work always for the standard app (and branded apps we made) but we don't have the resources for supporting other custom apps

Regards, Juan

In reply to Juan Leyva

Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -

Ah, thanks. So do you guarantee the standard app will work with airnotifier servers based on the fcm branch of the airnotifier repo? That's all I need.

Is there a specific version of the app we need to be on to have firebase support?

Thanks for the responses smile

In reply to Grayson Bartlet

Re: Firebase Cloud Messaging with custom AirNotifier?

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I dont think Moodle HQ can guarantee that a 3rd party tool will work with your custom built app on your own hosted airnotifier service. If you want guarantees you would need an SLA with a moodle partner or pay for the official moodle app build service.

In reply to Dan Marsden

Re: Firebase Cloud Messaging with custom AirNotifier?

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

Hi,

we can only guarantee that the official build will work, not a 3rd party.

I'm sorry but we have very limited resources to test if other apps will work with the standard fcm branch, and even if we are aware that doesn't work (because for example for any code introduced in that branch by the original developer or other circumstances) it won't be a priority for us to fix that.

As Dan mentioned, the only want to have some guarantees is via a SLA with a Moodle partner or contracting the official branding service.

Regards, Juan

In reply to Juan Leyva

Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -

No that's fine, as long as the official app works with our own airnotifier server. Means if my custom app doesn't work the problem's on my end.

So I don't need to be on a specific version of the official app for FCM support? As long as 3.5 and up works I'm good.

Thanks again.

In reply to Grayson Bartlet

Re: Re: Firebase Cloud Messaging with custom AirNotifier?

by Grayson Bartlet -
Wait, so are the new firebase credentials only used if the "Device type" is listed as firebase in the mdl_user_devices table?

If we just keep our gcm credentials, will things still be fine after the 29th? It looks like airnotifier updated the gcm provider to use the new firebase endpoints.
In reply to Grayson Bartlet

Re: Re: Firebase Cloud Messaging with custom AirNotifier?

by Issam Taboubi -
Picture of Core developers Picture of Plugin developers

Hi,

Is the transition from moodlehq / airnotifier to original airnotifier (fcm branch) done successfully? were there any modifications made on the mdl_user_device stable ?

Thank you

In reply to Juan Leyva

Re: Firebase Cloud Messaging with custom AirNotifier?

by Ahmed Samy -
Hi Juan,

Cannot be there a documentation on how to setup AirNotifier to work with own mobile app setup through Firebase ?

Best,
Ahmed