Moodle for mobile

Airnotifier with Custom App: No registered devices showing

 
Picture of Michael Isaakidis
Airnotifier with Custom App: No registered devices showing
 

Hi there

I have created a custom moodle app, only android for now,  using the current source code and built through the  phonegap builder. I am currently having issues with push notifications, I have setup the airnotifier server with the GCM number as shown in previous threads. I have also updated my moodle message settings to correspond to my airnotifier server. 

When I check for my registered mobile devices under the profile message settings it says that there are no registered devices. The app works with everything else but doesn't seem to register the device token. I was wondering what may cause this and if this may be preventing my push notifications from working. 

Thanks 

Michael 

 
Average of ratings: -
Picture of Juan Leyva
Re: Airnotifier with Custom App: No registered devices showing
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Please, take a look to the user_devices table, is there anything stored there?

Regards, Juan

 
Average of ratings: -
Picture of Pedro Jimenez
Re: Airnotifier with Custom App: No registered devices showing
 

Hi Juan,


I have the same problem, my user_devices table contains:

user_devices table


but these devices don't appear in the Messaging section.

Messaging section


 
Average of ratings: -
Picture of Juan Leyva
Re: Airnotifier with Custom App: No registered devices showing
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

The problem then is that Moodle can't register the devices in Airnotifier, can you add some debugging in the code?

Just after this line: https://github.com/moodle/moodle/blob/master/message/output/airnotifier/classes/manager.php#L167

Add there a print_r($resp);

And then go to your user ids' 4 profile page, you should see there the Airnotifier responses

Regards, Juan

 
Average of ratings: -
Picture of Pedro Jimenez
Re: Airnotifier with Custom App: No registered devices showing
 

Hi Juan,


Thank you for your help!

I added print_r($resp); in my manager.php and shows me the following error:


Error messaging


But I don't understand it. I registered manually the same token in airnotifier and it works.


Registered Token


Thank you very much Juan!!

 
Average of ratings: -
Picture of Michael Isaakidis
Re: Airnotifier with Custom App: No registered devices showing
 

Managed to get it working. 

Adding the extra logging helped to solve the issue. The problem was the Airnotifier URL (Site Administration -> Plugins -> Message outputs -> Mobile notifications) had a "/" at the end which was causing the request to be sent to the wrong server port so the request was timing out. 

Thanks for the help Juan 


 
Average of ratings: -
Picture of zhou Deng
Re: Airnotifier with Custom App: No registered devices showing
 

hi,

    I have a proberm.My user_devices table have not found android devices but only can show apple.Can you tell me why?Thank you!

 
Average of ratings: -
Picture of Juan Leyva
Re: Airnotifier with Custom App: No registered devices showing
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

are you using a custom version of the application or the official one?

Regards, Juan

 
Average of ratings: -
Picture of zhou Deng
Re: Airnotifier with Custom App: No registered devices showing
 

hi, Juan

   I am using this (https://github.com/moodlehq/moodlemobile.git).And building in eclipse.


 
Average of ratings: -