Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# DocumentLicense.checkLicense Method

Module: DocumentLicense

## Definition

Checks a license from a file.

This function does two things:

- First it loads the license from a file using the given path

- Then it checks the validity of the license regarding the host it is called on (Windows, Linux, Android …)

Important

Calling this function is required to get access to the license member getters.

Note

The optional parameter is required on Android and must be the JNIEnv* pointer casted as a void*. It can be set as NULL for other devices.

Python

    @staticmethod
    check_license(license_path: str) -> None

Parameters

> `license_path` str
> in Absolute or relative path to the license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static void checkLicense(String? licensePath)

Parameters

> `licensePath` String
> in Absolute or relative path to the license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static void CheckLicense(string licensePath)

Parameters

> `licensePath` string
> in Absolute or relative path to the license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static void checkLicense(String licensePath) throws DocumentException

Parameters

> `licensePath` String
> in Absolute or relative path to the license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func checkLicense(licensePath: String) throws

Parameters

> `licensePath` String
> in Absolute or relative path to the license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentLicense_CheckLicense (
        const char * licensePath,
        void * optionalParameter)

Parameters

> `licensePath` const char *
> in Absolute or relative path to the license file.
> `optionalParameter` void *
> in Only used on Android: JNIEnv* pointer casted as a void*. Ignored for other devices.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.