Cryptlex Documentation
  • Welcome to Cryptlex!
  • Getting Started
    • Overview
    • Licensing Models
  • License Management
    • License Templates
    • Implementing License Models
    • Creating Licenses
    • License Subscriptions
    • Custom License Fields
    • Meter Attributes
    • Suspending Licenses
    • Revoking Licenses
    • Maintenance Policies
  • Feature Management
    • Overview
    • Features and Entitlement Sets
    • License Feature Entitlements
    • Accessing Feature Entitlements
    • Use Cases
  • User Management
    • Roles
    • Creating Users
    • Authenticating Users
    • Organizations
    • Resellers
    • Customer Portal
    • Reseller Portal
    • Google SSO
    • SAML SSO
  • Release Management
    • Overview
    • Creating Releases
    • Distributing Releases
  • Node Locked Licenses
    • Overview
    • Using LexActivator
      • Using LexActivator with C, C++ and Objective C
      • Using LexActivator with C#
      • Using LexActivator with VB.NET
      • Using LexActivator with Java
      • Using LexActivator with Delphi
      • Using LexActivator with Python
      • Using LexActivator with Go
      • Using LexActivator with Node.js
      • Using LexActivator with Ruby
      • Using LexActivator with Android
      • Using LexActivator with iOS
      • Using LexActivator with Flutter
    • Using Web API
    • Offline Activations
    • Proxies and Firewall
  • Floating Licenses
    • Overview
    • Hosted Floating License Server
    • On-Premise Floating Licenses
      • LexFloatServer
      • Using LexFloatClient
        • Using LexFloatClient with C, C++ & Objective C
        • Using LexFloatClient with C#
        • Using LexFloatClient with VB.NET
        • Using LexFloatClient with Java
        • Using LexFloatClient with Delphi
        • Using LexFloatClient with Python
        • Using LexFloatClient with Node.js
        • Using LexFloatClient with Go
        • Using LexFloatClient with Android
        • Using LexFloatClient with iOS
      • Offline Floating License
  • Named User Licenses
  • Timed Trials
    • Verified Trials
    • Unverified Trials
  • Licensing Docker Apps
  • Webhooks
  • Automated Emails
  • Web Integration
    • Personal Access Tokens
    • Using Web API
    • Using Zapier
    • Using FastSpring
    • Custom Development
  • Changelog
    • Web API
    • LexActivator
    • LexFloatClient
    • LexFloatServer
  • Legal
    • Terms of Service
    • Privacy Policy
    • Subprocessors
    • Data Processing Addendum
    • Service Level Agreement
    • Security, Privacy, and Compliance
    • Open Source Licenses
  • Cryptlex On-Premise
    • Overview
    • System Requirements
    • Server Layout
    • Installation Guide
      • Docker Compose
      • Kubernetes
    • Configuring Client Libraries
    • Monitoring and Error Reporting
Powered by GitBook
On this page
  1. Timed Trials

Unverified Trials

Unverified trial does not require online activation. All the information regarding trial is only stored on the user's machine in an encrypted form. The trial resets if user formats the PC or deletes the local hidden trial data. This type of trial is not recommended.

As the unverified trial data is completely stored on the user's machine, you can have unlimited trial users and trial can start without an internet connection.

Adding unverified trial to your app

When your user installs your application first time, invoke ActivateLocalTrial() LexActivator API functions to start the trial. Following sample code should be executed once after user installs your app, ideally on a button click. Executing multiple times would will not reset the trial.

int status;
status = ActivateLocalTrial();
if (LA_OK == status)
{
	printf("Product trial activated successfully!");
}
else if (LA_LOCAL_TRIAL_EXPIRED == status)
{
	printf("Product trial has expired!");
}
else
{
	printf("Product trial activation failed: %d", status);
}

Once the trial is started you only need to invoke IsLocalTrialGenuine() and GetLocalTrialExpiryDate() LexActivator API functions at the start of your app after IsLicenseGenuine() check. Following is the sample code:

int trialStatus;
trialStatus = IsLocalTrialGenuine();
if (LA_OK == trialStatus)
{
	unsigned int trialExpiryDate = 0;
	GetLocalTrialExpiryDate(&trialExpiryDate);
	int daysLeft = (trialExpiryDate - time(NULL)) / 86500;
	printf("Trial days left: %d", daysLeft);
}
else if (LA_LOCAL_TRIAL_EXPIRED == trialStatus)
{
	printf("Trial has expired!");
}
else
{
	printf("Either trial has not started or has been tampered!");
	// Activate the trial
}

PreviousVerified TrialsNextLicensing Docker Apps

Last updated 10 months ago