Creating an Integrated Android Sender Application

Review the following content for information about creating an integrated sender application using the Ooyala mobile SDK for Android.

Use the following steps to integrate with the sender application without the OoyalaPlayer object (where the sender application does not contain a player, for example, when you open the app it only contains a list of videos you can play with no player embed). The list activity and Chromecast player activities show videos available for casting when the app is running. The player activity contains the Ooyala player that renders the videos.

These steps are written to extend the basic Ooyala Sample App.

Note: The following steps assume that you have knowledge of basic integration steps for the Ooyala Core SDK and an existing OoyalaPlayer setup. For details about creating the player, see the Ooyala Support site topic Creating a Basic Android App.
  1. Initial Configuration
    1. Open the ChromecastSampleApp in Android Studio.
  2. Configure the namespace and app ID To begin modifying the app, initialize the CastManager.
    1. Open and change the value of NAMESPACE and APP_ID. This is shown in the following code sample:
      public class SampleApplication extends Application {
      private final String NAMESPACE = "urn:x-cast:ooyala";
      private final String APP_ID = "4172C76F";
      Note: The APP_ID and NAMESPACE support the default receiver. For custom receivers adjust the code accordingly.
    2. Initialize CastManager with the following credentials:
      APP_ID The ID provided when the app is registered with the receiver app.
      NAMESPACE The namespace to identify the protocol of the message being sent for the related receiver app. namespaces is array of namespace. In most cases only one namespace is required. Based on current version of SDK, only the first namespace in the array is taken.
      Note: The namespace should not be changed unless you modify the receiver app source code.
      This step is shown in the following code sample:
      public void onCreate(Bundle savedInstanceState) 
         castManager = CastManager.initialize(getApplicationContext(), APP_ID, NAMESPACE);
      Note: CastManager is a static variable. Keep this object throughout the app life cycle.

Was this article helpful?