Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send data from server to android application [closed]

Tags:

android

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.

like image 596
providence Avatar asked Mar 13 '11 03:03

providence


2 Answers

I read that you need this right away. I have 2 suggestions for you.

  1. 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.

  2. [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.

like image 140
Rohit Mandiwal Avatar answered Oct 03 '22 19:10

Rohit Mandiwal


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

like image 39
Chris Stewart Avatar answered Oct 03 '22 21:10

Chris Stewart