Class AdobePlugin

java.lang.Object
com.castlabs.android.Plugin
com.castlabs.sdk.adobe.AdobePlugin

public class AdobePlugin extends Plugin
Adobe Mobile Services Plugin

This plugin integrates Adobe's Mobile Services SDK. Such SDK allows for tracking app navigation events, alongside with video tracking events. This integration takes care of the later of those. The SDK can be used from app code to perform additional operations.

To configure Adobe's SDK, a JSON file with name ADBMobileConfig.json must be included in the application's assets directory. The file contains the information about your Adobe account. At runtime, the Adobe SDK will read such JSON and use its configuration. For more information on how to obtain the configuration JSON please refer to Adobe's documentation.

In order for this plugin to operate, an already configured MediaSettings object must be provided at play time.

The plugin will not override any of the fields in the MediaSettings, except for the name in case it is null.

Basic usage of the plugin:


  public class MyApp extends Application {
     @Override
      public void onCreate() {
          super.onCreate();
          // ...
          AdobePlugin adobe = new AdobePlugin(/*optional boolean for debug logging*\/);
          PlayerSDK.register(adobe);
          // ...
          PlayerSDK.init(getApplicationContext());
      }
 }
 

When starting playback, the MediaSettings must be provided in the AnalyticsMetaData instance passed to the PlayerController.open(Bundle) method:


  bundle.putParcelable(SdkConsts.INTENT_ANALYTICS_DATA,
         AdobePlugin.createMetadata(mediaSettings));
  // ...
  playerController.open(bundle);
 
Since:
4.2.35
  • Constructor Details

    • AdobePlugin

      public AdobePlugin()
      Same as calling AdobePlugin(boolean) with false.
    • AdobePlugin

      public AdobePlugin(boolean debugLogging)
      Parameters:
      debugLogging - whether to enable debugLogging
  • Method Details

    • init

      public void init(Context context)
      Overrides:
      init in class Plugin
    • getId

      @NonNull public String getId()
      Specified by:
      getId in class Plugin
    • createMetadata

      @NonNull public static AnalyticsMetaData createMetadata(@NonNull com.adobe.mobile.MediaSettings mediaSettings)
      Populate or create an AnalyticsMetaData object from Adobe's MediaSettings.
      Parameters:
      mediaSettings - MediaSettings to use.
      Returns:
      instance of AnalyticsMetaData.
    • createMetadata

      @NonNull public static AnalyticsMetaData createMetadata(@NonNull com.adobe.mobile.MediaSettings mediaSettings, @Nullable AnalyticsMetaData analyticsMetaData)
      Populate or create an AnalyticsMetaData object from Adobe's MediaSettings.
      Parameters:
      mediaSettings - MediaSettings to use.
      analyticsMetaData - AnalyticsMetadata which will be used to save the Adobe config. If null, a new AnalyticsMetadata will be created.
      Returns:
      instance of AnalyticsMetaData.