How to connect Android App connecting to a web service

前端 未结 4 1851
抹茶落季
抹茶落季 2020-12-18 16:48

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

  1. I am thinking of creating a webservice that will ru

相关标签:
4条回答
  • 2020-12-18 17:30

    the best way is to create a web service and connect your application to the web service, you can use the tool http://www.wsdl2code.com that create all the needed code for connecting and parsing the data :)

    0 讨论(0)
  • 2020-12-18 17:40

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

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

    Links which might be useful :

    How to make a web-service in .NET (does not include the implementation in Android) : http://srikanthtechnologies.com/blog/dotnet/wsdaljava.aspx

    How to connect your service with Android :

    http://seesharpgears.blogspot.in/2010/11/basic-ksoap-android-tutorial.html

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

    http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html

    0 讨论(0)
  • you can easily achieve this by creating an end-points/routes using node.js or php then host it on the cloud. I think I like firebase for hosting for now, u might wonna try that it really cool. after creating those endpoint which will be connected to ur database then u use http get or post request depending on what u want from ur database in ur mobile app. if u are creating for android use Retrofit for http connection.

    0 讨论(0)
  • 2020-12-18 17:42

    I recommend to use WS on the server-side and you can use Ksoap android library on the client-side. Create a background thread which updates the UI with the new data with. Use AsyncTask, Loader or Handler which is fit for your solution. (Read the official reference for more info).

    0 讨论(0)
提交回复
热议问题