Vinay
Vinay

Reputation: 405

Send PUSH Notification to Android Client from java class on app-Engine

I have the requirement to send a PUSH notification to an android client from my java class. The class has been written using the guidelines provided at the url : http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html (Section 2.4 - Send Messages) This works fine on the standard application servers like JBOSS and Weblogic.

But the application needs to be moved to google app-engine but the class throws a compilation error saying : 'The class javax.net.ssl.HostnameVerifier is not supported by GAE's Java runtime environment'. Similar error is thrown for 'SSLSession' class too.

Is there a way this can be overcome ? Or is there is any other way to send PUSH notifications from Java classes running on the app-engine ?

Thanks, Vinay

Upvotes: 1

Views: 2510

Answers (2)

Viruzzo
Viruzzo

Reputation: 3025

It can't be overcome directly, meaning you can't make those classes run on GAE. As for a solution, I'm not sure why you would want to use a custom HostnameVerifier, so just try without it: use HttpURLConnection instead of HttpsURLConnection and remove all the "hostnameVerifier" parts.

Edit: you can also use App Engine's fetch API, that is supported for sure.

Upvotes: 1

Ibrahim Arief
Ibrahim Arief

Reputation: 9106

Regarding your question Is there is any other way to send PUSH notifications from Java classes running on the app-engine?, the answer is yes, third party services such as Beaconpush or Spire.io could be integrated well with app engine, and in some cases could be much cheaper in terms of cost compared to using the App Engine Channel API.

Upvotes: 0

Related Questions