AMP Android SDK: Licensing

Document created by Herberth Alvarado Champion on Aug 12, 2016Last modified by Orlando Sanchez Martinez on Jul 31, 2017
Version 7Show Document
  • View in full screen mode

Maintainer: Orlando Sanchez Martinez

This document is part of AMP Android SDK 



The Android AMP SDK includes a protection mechanism based on license codes.

Licenses are generated by Akamai and are valid only for a single application, since the Java package name of the Android app is used as input for the license generation.

Licenses are also tied to a specific expiration date (the contract's end plus a month buffer, or any other period of time that is agreed).


The AMP SDK will not work if one of the following happens:

  • You run your application without setting the license
  • You run your application with a license generated for a different app
  • You run your application on a date after the expiration date


The customer is responsible for updating the application to its users in a timely manner with a new license code that extends the Akamai Android SDK activation, or removes the Akamai Android SDK altogether if the customer decides not to renew it.


Therefore, it is recommended not to have the license hardcoded into the app (as a Java String or XML resource), but instead to have a remote method to query the license, that could be easily updated (as a Web Service call).


It is also recommended to have a method like the following:

try {




    //Proceed with playback
} catch (InvalidLicenseException e) {
    //Show warning

    //Return to your app





setLicense(String license): Sets the Android SDK license of your application. This license will be provided by Akamai.


isLicenseExpired() [Boolean]: Returns true if the set license has expired or if it is not valid.


getLicenseExpirationDate() [Date]: Returns the license expiration date. After the expiration date, the SDK won’t be able to play any video.


getLicensePackageName() [String]: Returns the package name for which the license was generated. If the package name is different than the package name of the application, the SDK won’t be able to play any video.



This document is part of AMP Android SDK