Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,36 @@
}
}

/**
* Synchronizes the activation data with the Cryptlex servers.
* The license must already be activated when this function is called.
* This is a blocking call that performs a one-time synchronization to refresh
* the local license data.
* In most cases, rely on IsLicenseGenuine(), which automatically handles
* periodic background synchronization based on the configured interval.
* <b>Note: </b>Do not use this function in regular application flow. Use it
* only when an immediate synchronization is required.
*
* @return LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_FAIL
* @throws LexActivatorException
*/
public static int SyncLicenseActivation() throws LexActivatorException {

Check warning on line 1643 in lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=cryptlex_lexactivator-android&issues=AZ1iYEFvirSE2c4q67zh&open=AZ1iYEFvirSE2c4q67zh&pullRequest=61
int status;
status = LexActivatorNative.SyncLicenseActivation();
switch (status) {
case LA_OK:
return LA_OK;
case LA_EXPIRED:
return LA_EXPIRED;
case LA_SUSPENDED:
return LA_SUSPENDED;
case LA_FAIL:
return LA_FAIL;
default:
throw new LexActivatorException(status);
}
}

/**
* Starts the verified trial in your application by contacting the Cryptlex
* servers.
Expand All @@ -1652,6 +1682,34 @@
}
}

/**
* Synchronizes the trial activation data with the Cryptlex servers.
* The trial must already be activated when this function is called.
* This is a blocking call that performs a one-time synchronization to refresh
* the local trial data.
* Unlike IsTrialGenuine(), which validates the trial activation locally, this
* function performs an immediate synchronization with the servers.
* <b>Note: </b>Use this function to immediately reflect server-side changes on
* the user's machine, such as trial extensions.
*
* @return LA_OK, LA_TRIAL_EXPIRED, LA_FAIL
* @throws LexActivatorException
*/
public static int SyncTrialActivation() throws LexActivatorException {

Check warning on line 1698 in lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=cryptlex_lexactivator-android&issues=AZ1iYEFvirSE2c4q67zi&open=AZ1iYEFvirSE2c4q67zi&pullRequest=61
int status;
status = LexActivatorNative.SyncTrialActivation();
switch (status) {
case LA_OK:
return LA_OK;
case LA_TRIAL_EXPIRED:
return LA_TRIAL_EXPIRED;
case LA_FAIL:
return LA_FAIL;
default:
throw new LexActivatorException(status);
}
}

/**
* Activates the trial using the offline activation response file.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,12 @@

public static native int IsLicenseValid();

public static native int SyncLicenseActivation();

Check warning on line 182 in lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=cryptlex_lexactivator-android&issues=AZ1iYEDVirSE2c4q67zf&open=AZ1iYEDVirSE2c4q67zf&pullRequest=61

public static native int ActivateTrial();

public static native int SyncTrialActivation();

Check warning on line 186 in lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=cryptlex_lexactivator-android&issues=AZ1iYEDVirSE2c4q67zg&open=AZ1iYEDVirSE2c4q67zg&pullRequest=61

public static native int ActivateTrialOffline(String filePath);

public static native int GenerateOfflineTrialActivationRequest(String filePath);
Expand Down
Loading