如何连接Android应用程序连接到Web服务 [英] How to connect Android App connecting to a web service

查看:381
本文介绍了如何连接Android应用程序连接到Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个小型应用程序,这个程序我要发送的数据(通过WiFi或蓝牙)到PC /服务器。

I created a small app and with this app I want to send the data (over wifi or bluetooth) to a PC/server.

  1. 我想创造一个web服务将运行在PC上,将不断听取任何传入的客户端请求的。

  1. I am thinking of creating a webservice that will run on the PC and will be listening constantly to any incoming client requests.

一旦收到来自客户端的请求,将数据传输时place.And的WebService收到数据后,它会自动打开一个应用程序/ GUI窗口显示接收到的数据。

Once it receives request from client, the data transfer takes place.And after the webservice receives the data it should automatically open an application/GUI window showing the data received.

我的问题是我可以创建一个使用TCP / IP在Java Web服务,并将它不断地在后台运行,并倾听客户的要求? 另外我如何开始一个GUI,一旦检测到Web服务客户端请求和接收数据?

My question is Can I create a webservice using TCP/IP in JAVA and have it constantly run in background and listening to client request? Also how do I start a GUI as soon as the webservice detects a client request and receives the data?

推荐答案

使用SQL Server来管理数据您的桌面上创建一个Web服务在.NET上的Visual Studio。

Use SQL Server to manage the data on your desktop and create a web-service in .NET on Visual Studio.

然后连接到Web服务的应用程序和设置/从DB获得数据,使用网络服务。

Then connect to the web-service in your application and set/get data from the DB, using web-services.

链接,这可能是有用的:

如何使Web服务在.NET中(不包括在Android上实现): http://srikanthtechnologies.com/blog/dotnet/wsdaljava.aspx

如何与And​​roid连接您的服务:

http://seesharpgears.blogspot.in/2010/ 11 /基本-KSOAP,Android的tutorial.html

http://www.$c$cproject.com/Articles/304302/Calling-Asp-Net-Webservice-ASMX-From-an-Android-Ap

HTTP://adrianandroid.blogspot。在/ 2012/05 /访问C-NET-网络服务in.html

这篇关于如何连接Android应用程序连接到Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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