开发者

Live Internet Based Data Transfer

I'm currently searching for a way to transfer a String array from one android to another through the internet (assuming both devices are connected to the internet).

There's the possibility that one (or both) of the devices is connected to a network which is provided by a router, therefore using the IP address isn't practical (as far as I know).

I've stumbled upon an idea which suggests using Email to transfer the data. but, if I'm not wrong, that will force me 开发者_StackOverflow中文版to translate the array to an Email, send it, and undo the translation (to get it back to a string array form).

I would prefer a solution that will transfer the String array as it is.

Is it possible? Is there a better way to executed this process?

(I'm developing in Java on the Eclipse IDE)

I'd be glad to hear your Ideas! (:


Several options:

  1. Device A sends an HTTP Request to the web server, Device B regularly gets data( using timer ) by sending request to fetch message sent to him. But this is not really real-time.
  2. Device A sends an HTTP Request to the web server, The Server Pushs to Device B. You need to implement Push using Comet or GWT.Comet wiki
  3. Implement XMPP Messaging. Device A send an XMPP Request, Server push to Device B. XMPP wiki

If I were you, I will do no 3. Since your explanation sounds more related to real-time messaging case. Please forget thinking about using email.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜