Yelp Integration in Android

↘锁芯ラ 提交于 2019-12-17 17:52:58

问题


I have to integrate yelp api in my android app. I have never done it so need a bit of help. I want to know how do I start, what all things are required, etc.

I tried implementing this code https://github.com/Yelp/yelp-api/blob/master/v2/java/Yelp.java in android. It gives a NoSuchMethodError at line request.send()

What might be the problem?


回答1:


For Yelp Integration in Android:

Step 1: Register to Yelp site. You will require Yelp keys. Register here . Get API access.

Step 2: You need to have scribe-1.2.1.jar in your project. Get it here.

Step 3: Add these 2 files in your project: Yelp.java and YelpApi2.java.

Step 4: You can remove the main() method from the Yelp.java and instead call the Yelp.search() from your activity. Search() takes 3 arguements: term,latitude and longitude. Term is the thing you want to search(eg. restaurants,bars,etc.).

Step 5: When you send the request, you get a json response. Parse the response to get the data. For more information on json response parameters, See this.

Follow these steps and you will be able to do Yelp Integration in your Android. See the the Api documentation provided by Yelp.

Another example which I found out: Yelp Example




回答2:


First Register to Yelp site than go to click here

than click on Make API Access and create your own outhentication key . Replace these key to github demo than run it ..its work .



来源:https://stackoverflow.com/questions/6676733/yelp-integration-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!