[LexActivator] Forcing a server sync

Is there a way to force a server sync with LexActivator?

We have in-app purchases to change the subscription plan, so we need to re-sync the license when the purchase is complete, to have the proper metadata associated with the new plan to unlock the relevant features in the app.

Hi @lindale

To accomplish this, you can call the IsLicenseGenuine() function, as the initial server synchronization takes approximately 3 seconds with an active internet connection, and the consecutive server syncs at the defined server sync interval. If this function has already been used at the program’s start, you can instruct customers to restart the program to ensure the changes take effect. Alternatively, after completing the in-app purchase, you can invoke this function again.

It’s important to note that server synchronization via IsLicenseGenuine() is an asynchronous operation and the status of the server sync is passed via SetLicenseCallback().

Ok so there is no way to do it synchronously?
Maybe deactivate and reactivate?

While you have the option to invoke the ActivateLicense() function for server synchronization in a synchronous manner, we typically do not recommend this method for server syncs.