开发者

Is Android more reliable than AJAX for phone/server communication?

I have an application that needs to send messages, repeatedly to the server. I'm currently using AJAX from the phone's browser and it works fairly reliably, but, as with all things cell-phone, not 100%. I'm curious if using Android and opening a socket to the server would give me any additional reliability, or if it would suffer from the same communication troubles that hinder the AJAX transmission.

all thoughts appre开发者_开发技巧ciated.


This really depends on what you are talking about doing, and why your communication fails.

However, in general if you can get to running your own code on the phone, you have more control over retry logic, exception handling and logging related to communications. When in a web-context using AJAX the browser is running the show, and you rely on it for proper management etc.


If you are using AJAX in the phone's browser, it sounds like you have a browser-based app. Are you sure you want to require the user to install extra software to use your webapp?

On the other hand, if this is already a custom application that just uses the browser for its user interface, then nevermind. You will still need to wire your Java code in a Javascript harness, but that isn't too bad.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜