Yelp Integration in Android
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?
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
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 .
精彩评论