Package com.jwplayer.pub.api.license
Class LicenseUtil
java.lang.Object
com.jwplayer.pub.api.license.LicenseUtil
Reads license keys from (in this order): application's manifest, app_data_dir/LICENSE_FILENAME,
SHARED_PREFERENCES_FILE_NAME, or BuildConfig.LICENSE_KEY
Writes license keys to app_data_dir/LICENSE_FILENAME, or SHARED_PREFERENCES_FILE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLicenseKey
(Context context) Attempt to read the license key from several locations in this order: Application preferences BuildConfig.LICENSE_KEYvoid
setLicenseKey
(Context context, String license) Writes the provided license to the shared preferences
-
Constructor Details
-
LicenseUtil
public LicenseUtil()
-
-
Method Details
-
getLicenseKey
Attempt to read the license key from several locations in this order:- Application preferences
- BuildConfig.LICENSE_KEY
- Parameters:
context
- Current context.- Returns:
- The license key, empty string if none could be found.
-
setLicenseKey
Writes the provided license to the shared preferences- Parameters:
context
- The application's contextlicense
- The license key to write
-