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.
I have the same problem, my user_devices table contains:
but these devices don't appear in the Messaging section.
The problem then is that Moodle can't register the devices in Airnotifier, can you add some debugging in the code?
Add there a print_r($resp);
And then go to your user ids' 4 profile page, you should see there the Airnotifier responses
Thank you for your help!
I added print_r($resp); in my manager.php and shows me the following error:
But I don't understand it. I registered manually the same token in airnotifier and it works.
Thank you very much Juan!!
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
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!