Android应用搜索网站和显示信息 [英] Android App searches website and displays information

查看:105
本文介绍了Android应用搜索网站和显示信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将如何去写一个Android应用程序,会上网,搜索,例如,某一个国家的首都(用户输入国的名称在搜索栏中的应用程序中),并显示应用程序中的首都名称?假设有一个网站,网上有这些信息 - 你可以去那里,键入一个国家的名称,它会给你的资本 - 这将是可能有我的应用程序搜索该网站(显然在背景中)对于信息,并将其显示在应用程序的用户?或者只是得到一个谷歌搜索的信息?在此先感谢!

How would I go about writing an Android application that will go online, search for, for example, the capital of a certain country (the user enters the name of the country in the search bar within the application), and display the name of the capital within the application? Assuming that there is a website online that has this information - you can go on there, type in the name of a country and it will give you the capital - would it be possible to have my application search that website (obviously in the background) for the information and display it to the user in the application? Or maybe just get the information with a Google search? Thanks in advance!

推荐答案

简短的回答:是的,这是可能的。

The short answer: yes, it is possible.

较长的答案是 - 你需要找到一个API,可以帮你。
Wolfram Alpha的可能正是你需要的。看看在这里: http://products.wolframalpha.com/api/

The longer answer is - you need to find an API, that can help you with that. Wolfram alpha may be exactly what you need. Have a look over here: http://products.wolframalpha.com/api/

的Siri的iPhone使用相同的API。

Siri for iPhone is using the same API.

这篇关于Android应用搜索网站和显示信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆