Complete guide for airnotifier

Complete guide for airnotifier

by Daniel Villareal -
Number of replies: 19
Does anyone here know the complete guide on how the airnotifier will work with own installation setup of moodle mobile and airnotifier thanks.
Average of ratings: -
In reply to Daniel Villareal

Re: Complete guide for 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 Daniel,

do you mean that you want to install your own version of Airnotifier instead using the plugin verison?

Cheers, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by Daniel Villareal -

Hi juan,

Iv'e already install airnotifier and setup messaging output. But it doesnt work. How to know if it is working? Thanks

In reply to Daniel Villareal

Re: Complete guide for 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 Daniel,

if you want to use your own instance of Airnotifier you would need your custom certificates and you custom Moodle Mobile version compiled for using your certificates.

Have you configured Airnotifier to use your custom certificates (iOs) and your GCM account?

Cheers, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by Daniel Villareal -

Hi Juan,

I'm currently working on GCM(android) first. Iv'e already created an account and generate the required keys and also iv'e already have my own installation of airnotifier. Do I need to follow the instructions on pushplugin to initialize the registration of my device to GCM? Another question, why is that airnotifier needs to start manually on the server?


Thanks.
~Dan

Attachment Screen Shot 2014-12-25 at 11.51.17 PM.png
In reply to Daniel Villareal

Re: Complete guide for 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 Daniel,

are you creating a mobile app based on Moodle Mobile from scratch? If you are using the current Moodle Mobile app code the only thing you should do is edit the config.json file and change there the gcmpn (GCM project number):

https://github.com/moodlehq/moodlemobile/blob/master/config.json

In Airnotifier you should monitor the error log to see what is happening, how do you start Airnotifier?

Airnotifier has a supervisord config file, you can use supervisord for starting/monitoring the server https://github.com/airnotifier/airnotifier/blob/master/supervisord.conf-sample

Cheers, Juan

Average of ratings: Useful (1)
In reply to Juan Leyva

Re: Complete guide for airnotifier

by Daniel Villareal -

Hi Juan,

Iv'e already configured the airnotifier and my own moodle mobile. How to check if it is working? 

Thanks
~Dan

In reply to Daniel Villareal

Re: Complete guide for airnotifier

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

You could use the API to send a Push request to airnotifier, you will need the device token, you can extract the device token from the user_devices table of a Moodle installation you connected via the application

https://github.com/airnotifier/airnotifier/wiki/API

If it's not working for you, I need you to describe step by step all the settings and configurations in both Airnotifier, the Moodle site and your app config.json file

Cheers, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by Daniel Villareal -
Hi Juan.

Iv'e tried and test the API but theres no luck. 

Thanks

~Dan
In reply to Daniel Villareal

Re: Complete guide for 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 Daniel,

in order to help you I will need detailed information of everything you've already did so I can imagine where the error is.

Can you list in order everything you've done?

Cheers, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by Daniel Villareal -
Hi Juan,

First I install airnotifier on my own server by following the instructions on https://github.com/airnotifier/airnotifier/wiki/Installation without doing the optional step. Next I install the mobile notification https://moodle.org/plugins/view.php?plugin=message_airnotifier on my own installation of moodle 2.6.x then I go to google console to enable GCM for android to generate api keys that is needed by airnotifier then ive created an access keys on airnotifier then configure the moodle notification and fill up all the required fields. Then lastly I've put the gcm keys to moodle mobile config.json.
In reply to Daniel Villareal

Re: Complete guide for airnotifier

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

Hello, some questions:


Can you share screenshots of your Moodle message_airnotifier plugin configuration?

Is your airnotifier instance publicly accesible?

Have you configure the user profile for receiving any type of message by Mobile notifications? 

Maybe, you can share with me (privat emessage) your airnotifier server admin credentials to do some internal tests

Average of ratings: Useful (1)
In reply to Juan Leyva

Re: Complete guide for airnotifier

by Hittesh Ahuja -
Picture of Moodle HQ Picture of Moodle Workplace team Picture of Plugin developers Picture of Testers

Hi Juan,

In the same boat as the OP.

I've installed a local instance of Airnotifier which can be accessed through my phone. Since I am testing this on Moodle 2.8 it has the push notification built in. 

This is what I have done till now:


  1. Followed the instructions to install airnotifier python app
  2. Airtnotifer is running at <ip>:88801 
  3. Created a new app called moodlemobile android(unique name) Moodle Mobile Android (full name) 
  4. Added the gcm project id and api key obtained from console.developers.google.com for GCM Api
  5. Added the settings to http://<moodle_instance>/admin/settings.php?section=messagesettingairnotifier

I am still confused on the step about adding the gcm number to config.json file . I'm not sure if I need to do this as I've downloaded the Moodle Mobile app from Google Play Store and not running it locally 

I dont see anything working when I send a message from the computer to a user logged into the android mobile app. Something that I am missing?


Many thanks

Hittesh

In reply to Hittesh Ahuja

Re: Complete guide for airnotifier

by Hittesh Ahuja -
Picture of Moodle HQ Picture of Moodle Workplace team Picture of Plugin developers Picture of Testers

... or is it that I cannot use the official android app with my own Air-notifier server ? 

In reply to Hittesh Ahuja

Re: Complete guide for 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,

nope, you cannot use the official app with your own server, you need to create a custom version of the app.

I'm thinking that maybe the official app may work with your own Airnotifier server but only in Android, because you don't need custom certificates (just the GCM key you can find in the config.json file)

Cheers, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by ong hazel -
Hi Juan,


I found that my moodle database user devices table is empty even though my custom moodle mobile app can access to my custom moodle site which is in localhost. Is it because of my site is not using HTTPS?   

In addition, my site version is moodle2.7 and the app is version 1.12

In reply to ong hazel

Re: Complete guide for 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,

it should work without HTTPS, if you go to Settings -> Development -> Device info you see the Push notification plugin listed at the bottom of the page?

Regards, Juan

In reply to Juan Leyva

Re: Complete guide for airnotifier

by ong hazel -
Thanks for the reply, 

yes, there is pushNotification plugin loaded

In reply to ong hazel

Re: Complete guide for airnotifier

by ong hazel -

Hi Juan,

My custom moodle mobile is in android platform, do I still need to get the certificate and key from developer.apple.com to create a new Development Push Notification certificate?

In reply to ong hazel

Re: Complete guide for airnotifier

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

If you are not going to create a custom version for iOs you won't need a Push Notification certificate

Cheers, Juan