Skip to content

Examples

Sergio Azua edited this page Jan 20, 2016 · 12 revisions

Each module of the SDK contains one or more sample projects that provide a pre-configured applications with API key and some sample data. The examples are a good way to quicky understand how the BVSDK works with real code.

Configuring the Examples

  1. Make sure that you open the project using Android Studio.

  2. You will need an emulator with API version 15 or greater. For full functionality the emulator should have Google Play Services installed.

  3. Provided are two build Flavors. One for internal testing which will hit the BV staging environment and the other for release which will hit the BV production environment. These can be found at /app/src/internal/ and /app/src/production/ respectively. Within these Flavors you will find BvUserComponentImpl and GoogleDFPComponentImpl. You will need to edit these to include your API keys and other dependencies. These dependencies will be injected into the BVSDK and used to run the app.

  4. App is ready to be run.

Sample Projects

The examples are located in their respective package within /app/src/main/java/com/example/bazaarvoice/bv_android_sdk:

Package BV Module Summary
ads Advertising The example shows how you can utilize the Bazaarvoice network to provide targeting advertising to your customers.
conversations Conversations Covers all the baseline method calls and their responses. It’s a good way for developers see the all the requests and responses of the SDK out of the box.
browseproducts Conversations Illustrates using the Bazaarvoice iOS SDK to query, browse and display ratings and reviews for products.
recommendations Recommendations This examples show how you can get product recommendations for a user.