English 中文(简体)
Is it possible to implement iPhone push notifications in a Google App Engine application?
原标题:

I m in the planning phase of an iPhone application and am considering using Google App Engine for my server component due to its scalability features.

Push notifications are sent using a binary interface to gateway.push.apple.com:2195.

However, the JRE for the server is only allowed to use the following standard classes, which does not include the Socket classes. Can URLConnection be used somehow to do this?

Is there a way to implement push notifications given the restrictions on Google App Engine applications?

I d like to avoid using a third-party service such as AppNotify or UrbanAirship if possible.

最佳回答

Now with Appengine Release 1.7.7 its possible!

问题回答

Nope. Google App Engine forbids native socket connections. You either need to use a third party service (like the ones you mentioned) or have another dedicated server for sending notifications.

EDIT: Please note that the limitation of GAE on sockets and outgoing calls isn t a library limitation only. Google servers actually block all outbound network connections; they only allow HTTP requests through URL Fetching servers.

If you like, you can star Issue 1164: Add Support for Apple Push Notification Service.

You use the 3rd-party library notnoop/java-apns. It is easy to use. The only problem you could meet is the thread limitation on the GAE

You could refer to this answer: https://stackoverflow.com/a/24900789/474002

It is absolutely possible. Check out java-apns-gae.

It s an open-source, Java APNS library that was specifically designed to work (and be used) on Google App Engine.

Lately, Google officially supports to send push notification on iOS. You can take a look at this sample code.

For more detail, checkout this Google s post.





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签