Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yelp Integration in Android

Tags:

android

yelp

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?

like image 712
Gaurav Avatar asked Jul 13 '11 09:07

Gaurav


1 Answers

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

like image 163
Gaurav Avatar answered Sep 21 '22 02:09

Gaurav