I'm looking for a client version for android to use the appengine channel API on my app. I've seen some other people developed, but none of them seems stable. Some have to use a web view for the JavaScript, etc. I don't want something like that.
Any resource about it, or any wise approach I could use?
By the way, I'm using appengine with python.
There's and official C2DM service to receive updates from the cloud on mobile devices, which works in a way similar to channels, by opening a socket and listening for updates. Is there any reason why you don't want to use C2DM?
Related
I have visited many blogs and questions looking for a way to use android as a client and nodejs as a server for my app. I came up with a solution that is to use PhoneGap like frameworks so that it could act like native but is not in reality. I need to use native android sdk and connect with NodeJS server (using SocketIO) to create my app. Is there any way I could do this?
P.S I want to know that while I set up by GCM can I pass my IP and port that I have created in my socket.io file to the GCM?
Cordova (hence PhoneGap) allows you to use most of the hardware APIs. PhoneGap nowadays is just a build service of some sorts.
The Cordova website and plugin store explain all the details. But t WebSockets are just an upgraded protocol or feature of TCP. Any newer technology supports it without any dependencies, but in dependence of the network you're traveling in.
Without diving deep into the code here at socket.io-website, I reckon that the initial build of your Cordova app is a WebSocket implementation to the server. So you got everything bootstrapped already.
What this tutorial doesn't explain is how to connect to the server. But read it up here.
I have no prior experience but Google Cloud Messaging seems not to be in the scope of the problem of socket.io. Once you have a connection to the socket you can send to the client whatever payload you want and might or might not need GCM anymore. If you need to send stuff via GCM read up on the the GCM node module.
Passing IPs around shouldn't be much of a problem since you're are running a public service anyway. You'd need to secure it anyhow of course.
I recently started using Google App Engine, and I want to make a Android client for the server. I searched this topic, and I found multiple tutorials on how to make a "backend." Is this the same thing as a client?
Thanks
The "backend" is typically the App Engine server. It is what sends your GCM notifications, hosts your API calls, etc.
The "client" is typically the Android application that interacts with the App Engine server.
I think they have 3 definitions of backend. The more general, informal use of the term would be the server that your Android client talks to (as described in accepted answer).
But GAE also supports 'backends, which are a special type of GAE instances:
https://developers.google.com/appengine/docs/java/backends/overview
And now they have introduced 'mobile backends' which seem to be pre-packaged GAE configurations for use with Android clients. Those are specifically not GAE backends.
i want to develop an application that will receive PUSH notification from
server. what is the best way to do this so that i dont have to write so much
code to implement this. I am looking for any commercial service that can do
this for me. Can you please suggest me some good api or service
Urban Airship (urbanairship.com) provides an API to do this. However I would recommend C2DM.
Google's c2dm provides nearly this http://code.google.com/android/c2dm/
Even though there is no official push api supported
Yes, here is a good tutorial with all code you need:
http://blog.boxedice.com/2010/10/07/android-push-notifications-tutorial/
http://tokudu.com/2010/how-to-implement-push-notifications-for-android/
Google's C2DM can do this very neatly. Its available from Android 2.2+. Here is a tutorial on how to do it by Vogella. http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html
If you want more control and run the service along side your server, you can try OpenMobster Mobile Cloud platform's push service.
It provides the following functionality
A platform agnostic Push API (works on Android and iOS)
Queuing (If you are not available, it will deliver later when the phone comes online)
Should get you up and running quite fast. (No certificates, device tokens etc etc). Just a secure persistent TCP connection to the OpenMobster server is needed (the framework establishes this when the service is installed on the phone)
For more on the platform you can checkout: http://code.google.com/p/openmobster/wiki/PushFramework
btw: The platform also supports Device-To-Device messaging between other devices in the systsem (applications could be chat, instant messaging etc)
D2D Framework doc: http://code.google.com/p/openmobster/wiki/D2DPushFramework
I noticed that Google C2DM quota is limited to 200000 messages per day. This makes me thinking that it should be used for very simple use cases. Now I understand why IM services like skype or others have a service always running on the background. Does a library exist to manage a persistent connection to the server? I have tried XMPP with Smack api but even if it is very good for desktop stable connections, it is not so suitable for mobile ones (that have many problems). I would prefer a simpler one specific for mobile applications. Does it exist?
Thanks
What are you trying to do here? Google C2DM quota is a soft-limit. If needed, you can email them and perhaps agree on some sort of business deal with them.
If you are looking for push-like experience, you can check out Urban Airship. They made their version of service that works on the Android devices without C2DM support.
I would recommend checking out Deacon. There is Android specific code and it runs as a service in the background with a connection to your server.
I'm currently writing an Android application that should be able to receive push notifications from another application hosted in Google's App Engine.
Since I can't use sockets in GAE, I though maybe using XMPP over GTalk server would solve my problem. But that way the Android Application would be connected to the users Gtalk account and thus showing the user as being online, when in reality the user is not.
Any way of achieving this kind of communication without showing the user as being online, and without asking the user to create a separate account?
Or any free push notification alternatives?
EDIT:
I'm targeting 1.5+ Android devices so C2DM isn't an option.
Thanks!
May be you can use the channel API: Building real-time web apps with App Engine and the Feed API
Not sure about the exact requirement of your app, but.. perhaps C2DM can be an alternative?
http://code.google.com/android/c2dm
I've found the PubNub service (http://www.pubnub.com/).
It enables push notifications through API's on several platforms (PHP, Ruby, JavaScript, Java, ...).
It's a paid service, but provides a free daily quota.
Although it's not the ideal solution to my problem, it'll have to suffice until some Channel API documentation comes out.
Thanks to all of you!
Why are you shying away from HTTP/JSON? Might be useful to know why you discounted the obvious solution...