What is the best manner in which to send data to an android device from a server from an android application? My current setup:
Postgresql database --> program running on server machine --> android device.
I currently am using a custom protocol, but I would ultimately like to make my data source available to the app development community at large. As such, I would like to know the best and most simple options by which I can serve this data.
I read that you need this right away. I have 2 suggestions for you.
HTTP Pooling
. keep the mobile application hitting to server with a defined frequency say 2 minutes in response to hit, server can send the desire information to mobile device. This basically depends on the rate how often you expect the server to contact to mobile application.
[RECOMMENDED] Use TCP mode
of communication between mobile and server. I recommend this because in TCP connectivity, server can push message
to the mobile application without the mobile application keep on hitting the server.
You'll want to look into Android Cloud To Device Messaging. Here's an excellent post from the official developer's blog: http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With