从获取到Android的Web服务器数据 [英] Fetch data from Android to webserver

查看:318
本文介绍了从获取到Android的Web服务器数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我心里有一个特定的概念,但我一个不自信的就是我可能性。

I have a certain concept in mind, but I an unsure what my possibilities are.


  1. 用户在网页上
  2. 输入一个名称(HTML表单)
  3. Web服务器发送推送通知用户
  4. 的Andr​​oid设备
  5. 应用程序查找此名称在contactslist并找到相应的电话号码

  6. 应用即刻发送这个信息返回到网络服务器,其中用户可以使用返回的电话号码。

  1. User enters a name (html form) on a webpage
  2. Webserver sends push notification to the Android device of the user
  3. Application looks for this name in the contactslist and finds the corresponding phone number
  4. Application instantly sends this information back to the webserver, where the user can use the returned phone number.

我不确定唯一的步骤是#4。我presume我不得不使用临时MYSQL数据库,并使用反向AJAX或东西都拿到返回的数据给用户没有他不必刷新页面(这整个过程需要进行几秒钟内完成顶多 - 越快越好)。
这一切听起来像一个非常劈十岁上下的方式我虽然,我希望所有的,你可以暗示我解决这个更好的方式 - 或者一个很好的资源,以我所描述的方法。
这很难,当你不知道它是什么,你正在寻找找到解决办法。

The only step I am unsure about is #4. I presume I'd have to use a temporary MYSQL database and use reverse AJAX or something alike to get the returned data to the user without him having to refresh the page (this entire process needs to be completed within a couple of seconds at most - the faster, the better). This all sounds like a very hack-ish approach to me though, I was hoping any of you could hint me with better ways of tackling this - or maybe a good resource to the approach I described. It's hard to find solutions when you're not sure what it is you're looking for.

非常感激!

推荐答案

我能想到的解决有两种方法#4

I can think of two ways of solving #4


  1. 民意调查做我得到的回应尚未?为什么我得到的回应吗?......

  2. 或使用WebSockets。这里有一个帖子,我发现可能是有用的:<一href=\"http://www.indicthreads.com/1525/building-real-time-web-applications-using-html-5-web-sockets/\"相对=nofollow>帖子

  1. poll "did I get the response yet?, did I get the response yet?..."
  2. or use websockets. here's a post I found that might be useful: post

这里有一个有趣的方法给它的所有使用Node.js的: nowjs

Here's one interesting approach to it all using node.js: nowjs

如果您计划使用机器人C2DM,检查出的最小 - 最大的交货时间。

If you plan to use Androids C2DM, check out the min-max delivery times.

这篇关于从获取到Android的Web服务器数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆