Custom Moodle Mobile app not sending notifications with private air notifier

Custom Moodle Mobile app not sending notifications with private air notifier

by Charu Dubey -
Number of replies: 0

Hello, 

I am setting up a private air notifier for my custom moodle mobile app. I am facing issues in sending notification to a user trying only android for now.

I have set up my system following moodle mobile custom apps. The mobile application is working fine except the notifications.

I have also setup the air notifier following the steps available in "Installing your own notifications infrastructure" in the Mobile app notifications document of moodle in the installation tab. I have created the GCM project number and Access Key.

I also tried to add SSL certificate in the air notifier config but it is throwing this error.

Version:1.0 StartHTML:0000000105 EndHTML:0000001521 StartFragment:0000000127 EndFragment:0000001503 Traceback (most recent call last):
  File "airnotifier.py", line 285, in <module>
    AirNotifierApp(services=services).main()
  File "airnotifier.py", line 193, in main
    ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
AttributeError: 'module' object has no attribute 'create_default_context'

After that I created new app in airnotifier and added those GCM project number and GCM Access Key to that app. I generated Access Key in the air notifier app and used that access key in Site administration -> Plugins -> Mobile outputs -> Mobile Notifications as shown in the image.

Adding air notifier access key to moodle desktop application with app name

After that if I go to User Profile -> Preferences -> Messaging, I still get the message "No registered devices. Devices will automatically appear after you install the Moodle Mobile app and add this site." in Mobile Notifications. 

In moodle mobile custom application, I have added the "com.sa.skillsalphalite" app_id in config.json file and also in config.xml widget id.

I also updated GCMPN number in config.json file and config.xml file for <variable name="SENDER_ID" value="XXXXXXXXX" />. 

I also created apk of my custom app and tried on mobile device as well, but i am unable to view "3 dots menu" in app settings -> notification preferences.

I checked out most of the help forums in moodle and used any help I could get from there but still no luck.

Can anyone please help me with this issue. How to check if moodle is able to connect to my private air notifier? 

Thanks

Charu

Average of ratings: -