Mobile SDKs: Integrate Bazaarvoice into your native Android and iOS apps.
Example Projects
The Bazaarvoice Mobile SDKs provide access to most of the core products Bazaarvoice offers. To learn more, go to the Mobile SDK documentation home page.
Contents
This page provides example projects to get you up-and-running quickly with the Bazaarvoice Mobile SDK for Android.
BV Conversations sample app
The BV Conversations sample app contains simple examples for displaying and submitting reviews.
Setup
-
Clone the BVSDK repository:
$ git clone https://github.com/bazaarvoice/bv-android-sdk-conversations-example.git
-
In Android Studio select Open an existing Android Studio Project, or File > Open.
-
Navigate to the root directory of the project, and click OK.
-
Add your BV generated config files to the demo apps asset directory.
-
Modify the productId in the Constants.java file to be an existing product in your catalog.
DemoConversationsAPIFragment.java
file.Running
-
Run the app.
-
You should now see the option to view reviews, or submit a review.
-
Display Reviews will look something like.
-
Submit Reviews could show errors because of network failure/etc.
-
Submit Reviews could show errors because of failure to include Form Fields required by your config.
-
You can go into the SubmitReviewsActivity.java file to modify the submission request to have the necessary Form Fields.
-
And once they have all been addressed, you should see success.
-
Make sure that when you want to actually submit, that you use the Action.Submit action parameter for your Submission requests.
BV API app
The BV API app contains simple minimal code examples for each of the products and how to set up the API calls for specific use cases.
Setup
-
Clone the BVSDK repository:
git clone https://github.com/bazaarvoice/bv-android-sdk.git
-
In Android Studio select Open an existing Android Studio Project, or File > Open.
-
Navigate to the root directory of the project, and click OK.
-
Add your BV generated config files to the demo apps asset directory.
-
To set the environment (production versus staging configuation), set the
public static final BazaarEnvironment ENVIRONMENT
value in theDemoConstants.java
project file.
DemoConversationsAPIFragment.java
file.Running
-
Right click the
DemoMainActivity.java
file, and select Run. -
On your device, you should see a home page like this. This app can be used to view example implementations of the different parts of the BVSDK.
-
There will be a drawer with simple code example for each of the products.
-
To see your own data in this app, tap the settings cog to go to the settings page, then tap "Select Preloaded Profile". You will be presented with the choice to chance the data source between "Mock Endurance Cycles" (which is a Bazaarvoice demo source), and your BV generated config. The BV generated config will automatically display the environment chosen in the
DemoConstants.java
file.
Next
If you haven't already, thoroughly read through all the documents in the Getting started section.
Familiarize yourself with the rest of the documentation by expanding each section in the navigation to the left.