如何连接Android应用程序连接到Web服务连接到、应用程序、Android、Web

2023-09-05 00:14:59 作者:棒棒糖,甜到忧伤

我创建了一个小型应用程序,这个程序我要发送的数据(通过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.

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

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