I followed the instructions from this sample but it didn't work. The frontend
added tasks to pull queue notification-delivery
but iOS clients didn't receive any push notification. It seems that the worker
didn't do its job. I don't know if the worker
automatically scan the pull queue and send out the push (using Javapns) or not. And I don't know how to check if a task in a Pull queue is processed.
What I did:
- Enable billing for GAE project.
- Follow instructions from the sample (edit Constants, add p12 certificate).
mvn clean install
from root directory.mvn clean package
from root directory.mvn appengine:update
fromcloudpush-ear
directory.- Make sure Javapns works with provided p12 file by writing some code in a standalone Java class, it did send push notifications to iOS clients.
- When I call
PushNotificationWorkerServlet
by requesting from browser to/_ah/start
, it throws an error sayingThis feature is only available to backend instances.
So I tried usingThreadManager.createThreadForCurrentRequest
instead ofThreadManager.createBackgroundThread
. The error was gone but nothing happened.
I think GAE with Task Queue is a perfect solution for scalable mobile applications so I'll stick with it.
Any help please? Thank you.
Reference: https://cloud.google.com/solutions/mobile/ios-push-notifications/