简体   繁体   中英

Calling .Net web service from Android Device

I am using Android Studio and Visual Studio (.NET MVC) to develop an application where an android device may store/retrieve/process (login /registration forms etc) data by calling methods in a .NET application.

I want to know the best way to achieve this.
Should I create a .NET Web service on my .NET side? (WCF)

This is my first time creating a web service layer so I would really appreciate it if someone could provide me an article on how to achieve this. I found a nice one below:

http://hintdesk.com/how-to-call-asp-net-web-api-service-from-android/

Thanks guys, just checking if I'm on the right track using web services for my application.

If you want to use .NET, then I would go with Wcf/Web api, depends on what you need.

The basics of building an HTTP service using ASP.NET Web API

Configure your Service to be restful, and pass the data using JSON so it would be easy to consume using libraries such as Retrofit or Volley. You can then use a library like Gson to parse the response.

Another upside is that if you later want to consume the data from other platforms (iPhone or web/mobile web) it would be very easy.

使用KSOAP的链接有一个非常简单的示例LINK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM