Airnotifier with Custom App: No registered devices showing

Re: Airnotifier with Custom App: No registered devices showing

by Juan Leyva -
Number of replies: 7
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

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

Regards, Juan

In reply to Juan Leyva

Re: Airnotifier with Custom App: No registered devices showing

by Pedro Jimenez -

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


In reply to Pedro Jimenez

Re: Airnotifier with Custom App: No registered devices showing

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

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

In reply to Juan Leyva

Re: Airnotifier with Custom App: No registered devices showing

by Pedro Jimenez -

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!!

In reply to Juan Leyva

Re: Airnotifier with Custom App: No registered devices showing

by Michael Isaakidis -

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: Useful (1)
In reply to Juan Leyva

Re: Airnotifier with Custom App: No registered devices showing

by zhou Deng -

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!

In reply to zhou Deng

Re: Airnotifier with Custom App: No registered devices showing

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

Hi,

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

Regards, Juan