Package com.castlabs

# Class ManifestLicenseLoader

java.lang.Object
com.castlabs.ManifestLicenseLoader

All Implemented Interfaces:
  `LicenseLoader`

public class ManifestLicenseLoader extends Object implements LicenseLoader
Implementation of the `LicenseLoader` that will return license data from the Manifest meta-data. You need to add a meta-data entry in your manifest using the key `castlabs-license`, for example:

     <application>
         ...
         <meta-data
             android:name="castlabs-license"
             android:value="..." />
     </application>

This license loader will access the meta-data and load the license from there or raise an exception if the license entry could not be found.

Since:
  3.3.0
See Also:
  - `PlayerSDK.init(Context, LicenseLoader)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ManifestLicenseLoader(Context context)`
  Creates a new instance of ManifestLicenseLoader.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getLicenseData()`
  This method must find the license file and return its bytes or throw an Exception if the license data could not be loaded.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ManifestLicenseLoader

    public ManifestLicenseLoader(Context context)
    Creates a new instance of ManifestLicenseLoader.
    Parameters:
      `context` - The application context used to access the manifest metadata

- ## Method Details

  - ### getLicenseData

    public byte[] getLicenseData() throws Exception
    Description copied from interface: `LicenseLoader`
    This method must find the license file and return its bytes or throw an Exception if the license data could not be loaded.
    Specified by:
      `getLicenseData` in interface `LicenseLoader`
    Returns:
      license the byte representation of the license file
    Throws:
      `Exception` - in case the license data could not be loaded