谷歌搜索API为Android系统 [英] Google Search api for Android systems
问题描述
我试图建立一个Android应用程序,会做谷歌本地搜索。
我知道有是Java 一个谷歌搜索API,而我能够将其用于桌面应用程序。然而,当我在我的Android项目使用相同的jar文件(gsearch.jar),一些问题出现。
当我把我的gsearch.Client对象的.localSearch()方法,运行时错误发生。该错误信息是:java.lang.VerifyError:gsearch.Client。此消息是发生在在Dalvik调试监视器日志。
那么,什么是这里的问题?我不能使用在Android的搜索API?
更重要的是,我该怎么做,从一个Android应用程序的本地搜索?难道Android SDK中有搜索的API内置的?我只能找到的地图API,以及地图搜索是不是我要找的。 P>
感谢您的帮助,
JRH
的这里中使用JSON调用谷歌的 AJAX本地搜索不使用Java gsearch库。
I'm trying to build an android app that would do a local search on google.
I know there is a Google Search API for Java, and I am able to use it for a desktop application. However, when I use the same jar file (gsearch.jar) in my android project, Some problems arise.
When I call the .localSearch() method of my gsearch.Client object, a runtime error is occurring. The error message is: "java.lang.VerifyError: gsearch.Client". This message is occurring in the Dalvik Debug Monitor log.
So what is the problem here? Can I not use the search API on the android?
More importantly, how do I do a local search from an android app? Does the android sdk have search APIs inbuilt? I could only find the Maps api, and Map search is not what I'm looking for..
Thanks for the help,
jrh
Here a solution using a JSON call to google ajax local search without using java gsearch library.
这篇关于谷歌搜索API为Android系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!