MeiCam SDK For Android  1.0.0
Classes | Public Member Functions | List of all members
com.meicam.sdk.NvsAssetPackageManager Class Reference

Resource package manager, managing resource bundles in video scenarios. More...

Classes

interface  AssetPackageManagerCallback
 Resource package management callback interface. More...
 

Public Member Functions

 NvsAssetPackageManager (boolean isEffectSdk)
 
void setInternalObject (long internalObject)
 
void setCallbackInterface (AssetPackageManagerCallback callback)
 Sets the package manager callback interface. More...
 
String getAssetPackageIdFromAssetPackageFilePath (String assetPackageFilePath)
 Gets the ID of the resource package from the file path of the resource package. More...
 
int getAssetPackageVersionFromAssetPackageFilePath (String assetPackageFilePath)
 Gets the version of the resource package from the file path of the resource package. More...
 
int installAssetPackage (String assetPackageFilePath, String licenseFilePath, int type, boolean synchronous, StringBuilder assetPackageId)
 Installs resource package. More...
 
int upgradeAssetPackage (String assetPackageFilePath, String licenseFilePath, int type, boolean synchronous, StringBuilder assetPackageId)
 Upgrades resource package. More...
 
int uninstallAssetPackage (String assetPackageId, int type)
 Uninstalls resource package. More...
 
int getAssetPackageStatus (String assetPackageId, int type)
 Gets the version of the resource package from the file path of the resource package. More...
 
int getAssetPackageVersion (String assetPackageId, int type)
 Gets the version of the resource bundle. More...
 
int getAssetPackageSupportedAspectRatio (String assetPackageId, int type)
 Gets the supported aspect ratio of the resource package. More...
 
List< String > getAssetPackageListOfType (int type)
 Gets a list of resource packages of a certain type. More...
 
boolean isCustomAnimatedSticker (String uuidString)
 Determines if it is a custom sticker. More...
 
boolean isParticleFX (String uuidString)
 Determines whether it is a particle effect. More...
 
boolean isThemeContainMusic (String uuidString)
 Check whether a theme package contain music. More...
 
String getVideoFxAssetPackageDescription (String uuidString)
 Gets the resource description of the VideoFx type. More...
 

Static Public Attributes

resource package type

static final int ASSET_PACKAGE_TYPE_VIDEOFX = 0
 Video effect type. More...
 
static final int ASSET_PACKAGE_TYPE_VIDEOTRANSITION = 1
 Video transition type. More...
 
static final int ASSET_PACKAGE_TYPE_CAPTIONSTYLE = 2
 Caption style type. More...
 
static final int ASSET_PACKAGE_TYPE_ANIMATEDSTICKER = 3
 Animated sticker type. More...
 
static final int ASSET_PACKAGE_TYPE_THEME = 4
 Theme type. More...
 
static final int ASSET_PACKAGE_TYPE_CAPTURESCENE = 5
 Capture scene type. More...
 
static final int ASSET_PACKAGE_TYPE_ARSCENE = 6
 AR scene type. More...
 
resource package state

static final int ASSET_PACKAGE_STATUS_NOTINSTALLED = 0
 Uninstalled state. More...
 
static final int ASSET_PACKAGE_STATUS_INSTALLING = 1
 Installing status. More...
 
static final int ASSET_PACKAGE_STATUS_READY = 2
 Preparation status. More...
 
static final int ASSET_PACKAGE_STATUS_UPGRADING = 3
 Upgrading status. More...
 
Resource package management error type

static final int ASSET_PACKAGE_MANAGER_ERROR_NO_ERROR = 0
 Installed successfully. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_NAME = 1
 Wrong name. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_ALREADY_INSTALLED = 2
 Already installed. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_WORKING_INPROGRESS = 3
 Installation or upgrade in progress. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_NOT_INSTALLED = 4
 Not installed yet. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_IMPROPER_STATUS = 5
 Incorrect status. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_DECOMPRESSION = 6
 Decompression error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_INVALID_PACKAGE = 7
 Invalid package. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_ASSET_TYPE = 8
 Resource type error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_PERMISSION = 9
 License error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_META_CONTENT = 10
 Meta content error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_SDK_VERSION = 11
 SDK version error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_UPGRADE_VERSION = 12
 Upgrade version error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_IO = 13
 Input and output error. More...
 
static final int ASSET_PACKAGE_MANAGER_ERROR_RESOURCE = 14
 Resource error. More...
 
Aspect ratio supported by the resource package

static final int ASSET_PACKAGE_ASPECT_RATIO_16v9 = 1
 
static final int ASSET_PACKAGE_ASPECT_RATIO_1v1 = 2
 
static final int ASSET_PACKAGE_ASPECT_RATIO_9v16 = 4
 
static final int ASSET_PACKAGE_ASPECT_RATIO_4v3 = 8
 
static final int ASSET_PACKAGE_ASPECT_RATIO_3v4 = 16
 
static final int ASSET_PACKAGE_ASPECT_RATIO_18v9 = 32
 
static final int ASSET_PACKAGE_ASPECT_RATIO_9v18 = 64
 

Detailed Description

Resource package manager, managing resource bundles in video scenarios.

In the development of the SDK, the resource package manager unifies the various special resource packages including subtitles, themes, animation stickers, etc. for installation, upgrade, and uninstallation. When installing, upgrading, and uninstalling, there will be a corresponding error type for errors to be quickly located and resolved.

Warning
In the NvsAssetPackageManager class, all public APIs are used in the UI thread! ! !

Constructor & Destructor Documentation

com.meicam.sdk.NvsAssetPackageManager.NvsAssetPackageManager ( boolean  isEffectSdk)
inline

Member Function Documentation

String com.meicam.sdk.NvsAssetPackageManager.getAssetPackageIdFromAssetPackageFilePath ( String  assetPackageFilePath)
inline

Gets the ID of the resource package from the file path of the resource package.

Parameters
assetPackageFilePathResource file path
Returns
Returns a string representing the resource package ID
List<String> com.meicam.sdk.NvsAssetPackageManager.getAssetPackageListOfType ( int  type)
inline

Gets a list of resource packages of a certain type.

Parameters
typeResource package type. Note: The parameter to be entered is a value of static int type, and is prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type.
Returns
Returns a list of resource packages under a certain type. Each element in the list is a resource package ID.
int com.meicam.sdk.NvsAssetPackageManager.getAssetPackageStatus ( String  assetPackageId,
int  type 
)
inline

Gets the version of the resource package from the file path of the resource package.

Parameters
assetPackageIdResource package ID to be checked.
typeThe type of the resource package to be queried. Note: The parameter to be entered is a value of static int type and is prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type.
Returns
Returns the current state value of the resource package.

Note: The return value is a static int value prefixed with ASSET_PACKAGE_STATUS. 0, namely ASSET_PACKAGE_STATUS_NOTINSTALLED, indicates that the package has not been installed. Please refer to resource package status.

int com.meicam.sdk.NvsAssetPackageManager.getAssetPackageSupportedAspectRatio ( String  assetPackageId,
int  type 
)
inline

Gets the supported aspect ratio of the resource package.

Parameters
assetPackageIdResource package ID
typeResource package type. Note: The parameter to be entered is a value of static int type, and is prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type.
Returns
Returns the supported aspect ratio of the resource package. This value is the result of bitwise OR of several aspect ratios. Please refer to Aspect Ratio Supported Aspect Ratio.
int com.meicam.sdk.NvsAssetPackageManager.getAssetPackageVersion ( String  assetPackageId,
int  type 
)
inline

Gets the version of the resource bundle.

Parameters
assetPackageIdResource package ID
typeResource package type. Note: The parameter to be entered is a value of static int type, and is prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type.
Returns
Returns the obtained resource bundle version.
int com.meicam.sdk.NvsAssetPackageManager.getAssetPackageVersionFromAssetPackageFilePath ( String  assetPackageFilePath)
inline

Gets the version of the resource package from the file path of the resource package.

Parameters
assetPackageFilePathResource file path
Returns
Returns the resource bundle version. Return 1 if the resource bundle does not contain a version number.
String com.meicam.sdk.NvsAssetPackageManager.getVideoFxAssetPackageDescription ( String  uuidString)
inline

Gets the resource description of the VideoFx type.

Parameters
uuidStringspecial effect uuid
Returns
Returns a String object, which is a resource description.
Since
1.14.0
int com.meicam.sdk.NvsAssetPackageManager.installAssetPackage ( String  assetPackageFilePath,
String  licenseFilePath,
int  type,
boolean  synchronous,
StringBuilder  assetPackageId 
)
inline

Installs resource package.

Parameters
assetPackageFilePathFile path of the resource package to be installed.
licenseFilePathAuthorization file path of the resource package to be installed.
typeThe type of resource package to be installed. Note: The parameter to be entered is the value of the static int attribute prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type
synchronousWhether to install synchronously. A value of true means the installation process will block the current thread until it succeeds or fails, false means that the result of the installation process is asynchronously notified by the delegate (It can also be notified by the current thread).
assetPackageIdOutput parameter, which returns the resource package ID.
Returns
Returns an integer value indicating the type of resource package error.

Note: Note: The return value is of the static int type, and is prefixed with ASSET_PACKAGE_MANAGER_ERROR. "ASSET_PACKAGE_MANAGER_ERROR_NO_ERROR" indicates a successful installation (this may only be returned if the installation is synchronized), while any other value suggests an error. Please refer to Resource Package Management Error Type.

See also
upgradeAssetPackage uninstallAssetPackage
boolean com.meicam.sdk.NvsAssetPackageManager.isCustomAnimatedSticker ( String  uuidString)
inline

Determines if it is a custom sticker.

Parameters
uuidStringsticker uuid
Returns
Returns a boolean object indicating whether it is a custom sticker.
Since
1.11.0
boolean com.meicam.sdk.NvsAssetPackageManager.isParticleFX ( String  uuidString)
inline

Determines whether it is a particle effect.

Parameters
uuidStringparticle effect uuid
Returns
Returns a boolean object indicating whether it is a particle effect.
Since
1.14.0
boolean com.meicam.sdk.NvsAssetPackageManager.isThemeContainMusic ( String  uuidString)
inline

Check whether a theme package contain music.

Parameters
uuidStringtheme package uuid
Returns
Returns boolean value indicating whether it contains music.
Since
2.6.0
void com.meicam.sdk.NvsAssetPackageManager.setCallbackInterface ( AssetPackageManagerCallback  callback)
inline

Sets the package manager callback interface.

Parameters
callbackPackage manager callback interface
void com.meicam.sdk.NvsAssetPackageManager.setInternalObject ( long  internalObject)
inline
int com.meicam.sdk.NvsAssetPackageManager.uninstallAssetPackage ( String  assetPackageId,
int  type 
)
inline

Uninstalls resource package.

Parameters
assetPackageIdID of the resource package to be uninstalled
typeThe type of resource package to be uninstalled. Note: The parameter to be entered is a value of static int type and is prefixed with ASSET_PACKAGE_TYPE. Please refer to resource package type
Returns
Returns an integer value indicating the type of resource package error.

Note: The return value is a value of static int type and is prefixed with ASSET_PACKAGE_MANAGER_ERROR. If ASSET_PACKAGE_MANAGER_ERROR_NO_ERROR is returned, the uninstallation is successful, otherwise the uninstallation fails. Please refer to Resource Package Management Error Type.

See also
installAssetPackage upgradeAssetPackage
int com.meicam.sdk.NvsAssetPackageManager.upgradeAssetPackage ( String  assetPackageFilePath,
String  licenseFilePath,
int  type,
boolean  synchronous,
StringBuilder  assetPackageId 
)
inline

Upgrades resource package.

Parameters
assetPackageFilePathFile path of the resource package to be upgraded
licenseFilePathAuthorization file path of the resource bundle to be upgraded
typeThe type of resource bundle to be upgraded. Note: The parameter to be entered is a value of static int attribute prefixed with ASSET_PACKAGE_TYPE. Please refer to Resource Type.
synchronousWhether to upgrade synchronously. If the value is true, the upgrade process will block the current thread until it succeeds or fails. If it is false, the result of the upgrade process is asynchronously notified by the delegate (It can also be notified by the current thread).
assetPackageIdOutput parameter, which returns the resource package ID
Returns
Returns an integer value indicating the type of resource package error.

Note: The return value is of static int type and is prefixed with ASSET_PACKAGE_MANAGER_ERROR. "ASSET_PACKAGE_MANAGER_ERROR_NO_ERROR:" indicates a successful upgrade (This may only be returned if the upgrade is synchronized), while any other value suggests a upgrade error. Please refer to Resource Package Management Error Type.

See also
installAssetPackage uninstallAssetPackage

Member Data Documentation

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_16v9 = 1
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_18v9 = 32
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_1v1 = 2
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_3v4 = 16
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_4v3 = 8
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_9v16 = 4
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_ASPECT_RATIO_9v18 = 64
static
final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_ALREADY_INSTALLED = 2
static

Already installed.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_ASSET_TYPE = 8
static

Resource type error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_DECOMPRESSION = 6
static

Decompression error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_IMPROPER_STATUS = 5
static

Incorrect status.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_INVALID_PACKAGE = 7
static

Invalid package.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_IO = 13
static

Input and output error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_META_CONTENT = 10
static

Meta content error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_NAME = 1
static

Wrong name.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_NO_ERROR = 0
static

Installed successfully.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_NOT_INSTALLED = 4
static

Not installed yet.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_PERMISSION = 9
static

License error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_RESOURCE = 14
static

Resource error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_SDK_VERSION = 11
static

SDK version error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_UPGRADE_VERSION = 12
static

Upgrade version error.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_MANAGER_ERROR_WORKING_INPROGRESS = 3
static

Installation or upgrade in progress.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_STATUS_INSTALLING = 1
static

Installing status.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_STATUS_NOTINSTALLED = 0
static

Uninstalled state.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_STATUS_READY = 2
static

Preparation status.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_STATUS_UPGRADING = 3
static

Upgrading status.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_ANIMATEDSTICKER = 3
static

Animated sticker type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_ARSCENE = 6
static

AR scene type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_CAPTIONSTYLE = 2
static

Caption style type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_CAPTURESCENE = 5
static

Capture scene type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_THEME = 4
static

Theme type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_VIDEOFX = 0
static

Video effect type.

final int com.meicam.sdk.NvsAssetPackageManager.ASSET_PACKAGE_TYPE_VIDEOTRANSITION = 1
static

Video transition type.


The documentation for this class was generated from the following file: