MVC的Web API调用从Android应用程序应用程序、Web、MVC、Android

2023-09-07 17:59:01 作者:孤风失欢

我在VS 2012上运行的MVC的Web API应用它连接到的一些数据的SQL Server数据库。我要输出这个数据到一个TextView在我的Andr​​oid应用程序,但我找不到任何好的教程正是这么做的。如果你能指导我在一个方向,这将是多少AP preciated。

I have an MVC Web API application running in VS 2012. It is connected to a SQL Server Database with some data. I want to output this data to a textview on my android application but I cannot find any good tutorials that does exactly that. If you could guide me in the direction of one that would be much appreciated.

推荐答案

您的Andr​​oid应用程序将需要使用HTTP从Web API获取数据。这将很可能是JSON它检索,处理,然后更新TextView的。

Your Android app will need to use HTTP to get the data from your Web API. This will most likely be JSON that it retrieves, processes, and then updates the TextView.

本教程将告诉你该怎么做:http://blog.strikeiron.com/bid/73189/Integrate-a-REST-API-into-Android-Application-in-less-than-15-minutes

This tutorial will show you what to do: http://blog.strikeiron.com/bid/73189/Integrate-a-REST-API-into-Android-Application-in-less-than-15-minutes