Java Android REST 教程/示例项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29243595/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 07:38:45  来源:igfitidea点击:

Android REST Tutorial / Sample Project

javaandroid

提问by YnotDraw

Coming from Windows Phone/Store development, I'm used to a lot of tutorials and sample projects on things. I can't, for the life of me, find any good resources on how to create an Android app which interacts with a real REST service. Just a simple app which talks to some random API to help people see how to write Android apps. An app which just hits an API and throws some decent looking view elements on the display would be great.

来自 Windows Phone/Store 开发,我习惯了很多关于事物的教程和示例项目。在我的一生中,我找不到任何关于如何创建与真正的 REST 服务交互的 Android 应用程序的好资源。只是一个简单的应用程序,它与一些随机的 API 对话以帮助人们了解如何编写 Android 应用程序。一个只点击 API 并在显示器上抛出一些看起来不错的视图元素的应用程序会很棒。

In Windows land, typically these resources are plentiful and offer best practices, project layout suggestions, etc. Since Android has a greater market share, I expected to find resources easier, but apparently not. Any help would be appreciated. My current setup is using Android Studio.

在 Windows 领域,这些资源通常很丰富,并提供最佳实践、项目布局建议等。由于 Android 拥有更大的市场份额,我希望更容易找到资源,但显然不是。任何帮助,将不胜感激。我目前的设置是使用 Android Studio。

采纳答案by MQ87

Here it is one: http://code.tutsplus.com/tutorials/create-a-weather-app-on-android--cms-21587

这是一个:http: //code.tutsplus.com/tutorials/create-a-weather-app-on-android--cms-21587

At the 9 point you will find the class used for the httpCall. This is just the first one I found looking on Google for "meteo app android tutorial" . It seems good.

在第 9 点,您将找到用于 httpCall 的类。这只是我在 Google 上找到的第一个“meteo app android 教程”。看起来不错。