Google App Engine modules + Task queue for iOS push notification

152 views Asked by At

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:

  1. Enable billing for GAE project.
  2. Follow instructions from the sample (edit Constants, add p12 certificate).
  3. mvn clean install from root directory.
  4. mvn clean package from root directory.
  5. mvn appengine:update from cloudpush-ear directory.
  6. 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.
  7. When I call PushNotificationWorkerServlet by requesting from browser to /_ah/start, it throws an error saying This feature is only available to backend instances. So I tried using ThreadManager.createThreadForCurrentRequest instead of ThreadManager.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/

0

There are 0 answers