V2 AppLicenseChecker
public abstract class AppLicenseChecker extends Object
java.lang.Object↳ com.onestore.extern.licensing.AppLicenseChecker
This is the primary interface for communication between the ALC library and the user application code.
class YourActivity extends AppCompatActivity {
private AppLicensChecker mAppLicenseChecker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
mAppLicenseChecker = AppLicenseChecker.get(MainActivity.this, getString(R.string.publick_key, new AppLicenseListener());
}
...
}
private class AppLicenseListener implements LicenseCheckerListener {
...
}class YourActivity extends AppCompatActivity { private AppLicensChecker mAppLicenseChecker; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... mAppLicenseChecker = AppLicenseChecker.get(MainActivity.this, getString(R.string.publick_key, new AppLicenseListener()); }...} private class AppLicenseListener implements LicenseCheckerListener { ...}
Set the LicenseCheckerListener to receive the publicKey and response results through AppLicenseChecker.get().
Summary
@interface
Public methods
get
Create an instance of the AppLicenseChecker.
context
AppLicenseChecker applicationContent is used to connect to the login module.
base64PublicKey
base64PublicKey
listener
Returns:
AppLicenseChecker
queryLicense
When calling the queryLicense API, it will work in conjunction with the cache policy. Generally, a user's purchase history license is delivered through the ONE store server, but when access to the ONE store server is not possible due to network failures or airplane mode, a locally cached license is used to ensure execution until the expiration date.
We recommend using this API for customers who have network condition problems or who are on airplane mode.
strictQueryLicense
destroy
Last updated

