See the FreeWheel Sample App in Action on Android

Use the following steps to configure and run the FreeWheel sample app..
  1. Get the SDK and open the sample app in your Eclipse environment.
    1. Download the Ooyala FreeWheel SDK for Android (available at Ooyala Downloads).
    2. Unzip the OoyalaFreeweheelSDK-Android.zip file.
    3. Go to the subdirectory OoyalaFreeWheelSDK-Android/FreeWheelSampleApp.
    4. Open the following file in Eclipse:
      src/ooyala/com/android/freewheelsampleapp/FreeWheelSampleAppActivity.java
  2. Update the FreewheelSampleAppActivity class to include your own PCODE. This is the Ooyala-supplied provider ID code. For details, see Your API Credentials.

    The following code snippet shows the PCODE variable to modify:

    public class FreewheelSampleAppActivity extends Activity {
      final String PCODE  = "XXXXXXXXXXXXXXXX";
      final String DOMAIN = "http://www.ooyala.com";
    ...
    Note: Leave the DOMAIN unchanged as http://www.ooyala.com. This constant works in conjunction with Syndication Controls (publishing rules) in Backlot. If you have set Internet domain restrictions on videos in Backlot (see the Backlot User Guide), the constant here can be set to one of those allowed domains. If you have not set these Syndication Controls, the constant has no effect.
  3. Update the embedMap hash with your FreeWheel assets.
    embedMap = new HashMap < String, String>();
      embedMap.put("Freewheel Preroll", "XXXXXXXXXXXXXXXX");
      embedMap.put("Freewheel Midroll","XXXXXXXXXXXXXXXX");
      embedMap.put("Freewheel Postroll","XXXXXXXXXXXXXXXX");
      embedMap.put("Freewheel PreMidPost","XXXXXXXXXXXXXXXX");
  4. Save your changes.
  5. From the Run menu, select Run. The Android Virtual Device (AVD) selector appears.
  6. Select a virtual device or attach real hardware to your system.
  7. Click the play button to view the video.

Was this article helpful?