Within your Source Code you use the EasyGo commands and some additional checks.
• | Open your license file with prepareAndActivate |
• | Check if the version is already activated because only then you need to perform the additional online check - getWebActivation using the main module ID would return 2 = application is activated |
If the product is already activated,
• | Retrieve the Serial Number using getSerial |
• | Enable the regular online check of this module with setVerificationOfModule = 1. This is only necessary if the online check was not enabled within the project template |
• | The current status can be retrieved using getVerificationOfModule. The result frozen = 2 indicates that the license was locked . Implement a reactivation screen like this: License deactivated / reactivate license |
• | Perform the online check with checkModuleSubscription (with grace period) specifying the main module number and using the Serial Number as ID |
Licence Protector MAC Edition will go online only if the next check is due. Otherwise Licence Protector MAC Edition will just continue without going online. Note: getNextVerificationOfModule will retrieve the date, when the next online check is due.
The check is documented on the Activation Server 4 with transaction type Validation.
• | The next date to go online is retrieved from the product configuration - value from field Regular license checks (days). The new date for the next online verification is stored in the license file. It can be changed using setNextVerificationOfModule |
Program logic depending on the results of checkModuleSubscription
• | Only continue in your application if error code is 0 |
• | If error code is 3018 then the license is locked on the Activation Server 4 (see how to lock the license). Your application should terminate. If the user restarts the application, the prepareAndActivate command will result in an error screen |
• | If error code is 3001 then no online connection could be established. This error will appear only if no grace period is left (see below) |
In case the connection to the Activation Server 4 fails, a grace period is activated (if value of grace period >0) . Details see checkModuleSubscription
• | Use setSubGraceDays to overwrite the default value of the template <SubGraceDays> |
• | Use getRemainingSubgraceDays to retrieve the remaining grace time as an exact double value (e.g. 2.8765 days) |
Set the grace period to 10000 days in case you have installations which have never an online connection. This allows activating the regular license check as a general setup and the application would work with or without an online connection.
• | It is normally sufficient to use the main module for the online check although the online check can be activated per module |
• | By default, the first date for the regular online check is used from the configuration file on the Activation Server 4, product configuration - Regular license check (days) |
• | A date for the first/next online validation could be set with setNextVerificationOfModule. getNextVerificationOfModule will retrieve the date for the next regular online check |
• | Set the date, when online check should end with setEndVerificationOfModule. After this date, all checks are terminated |
• | The current status can be retrieved using getVerificationOfModule |
• | Set the grace period with setSubGraceDays |
• | The regular license check can be changed or terminated for a single key within the Key Details on the Activation Server 4 |