[aerogear-dev] Sndroid Background push notifications not working
delalis
delalis at gmail.com
Tue Jun 2 15:27:55 EDT 2015
Thanks Sebastien!
heres what I sent to my team to give you a better idea of how we had it set
up to use javascript to register with GCM and then Java to insert into the
Aerogear database:
- We recently switched from using the “classic phonegap push plugin” to the
“Aerogear phonegap push plugin” because background Android pushes weren’t
coming through, or the payload was different than the classic push plugin
expected, still not sure about that. Either way, it was recommended by
Aerogear devs to switch to the Aerogear push plugin.
- Our Aerogear server is hidden behind the ESB.
- The device originally called the Drupal Rest service Leaton created to
register devices
- We can no longer do that because the Aerogear push plugin requires you to
specify the Aerogear server in a config variable so it can talk DIRECTLY to
the Aerogear service to register the devices. But since it is behind the
ESB, we can not specify this server from the clients perspective.
- So I thought maybe we can just call the rest service to register the
devices like we used to, and forego the Aerogear’s “register()” function all
together. However, this wont work because calling the “register()” function
is how the client creates a handler to handle the push notifications … i.e.
register(onNotificationGCM)
- Since the classic push plugin didn’t require an Aerogear server URL, we
were able to use it to register the device with Apple/GCM, and then in the
success method we called Leatons REST service to insert it into a database
on the ESB, and eventually it would make it into Aerogear using a JAVA
service (Aerogears Java Sender API) running on the ESB.
- But the new Aerogear push plugin’s register() method seems to want to
register the device with Apple/GCM AND with the Aerogear server all in one
step. But since the Aerogear server (ESB) is not accessible to the public,
we are POOCHED.
I’m going to try to call the register() function without specifying the
aerogear server, but I expect it to fail since the Aerogear push plugin API
says it is required….
What to do…what to do….
--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11735.html
Sent from the aerogear-dev mailing list archive at Nabble.com.
More information about the aerogear-dev
mailing list