Skip to content

Change Store & License Settings

Patryk Michalik edited this page Mar 22, 2021 · 2 revisions

MainActivity.kt defines store and license settings:

override val billingEnabled = true
    
override fun amazonInstallsEnabled():Boolean = false
override fun checkLPF():Boolean = true
override fun checkStores():Boolean = true

...

override fun getLicKey():String? = "MIIBIjANBgkqhkiGgKglYGYGihLuihUuhhuBlouBkuiuBIyvYV"

...

override fun getLicenseChecker():PiracyChecker? {
    destroyChecker() ...
    return if (BuildConfig.DEBUG) null else super.getLicenseChecker()
}

Set Boolean Values

Booleans accept true and false as values. Find the following:

override fun amazonInstallsEnabled():Boolean = false
override fun checkLPF():Boolean = true
override fun checkStores():Boolean = true

This outlines the functions of the booleans:

Boolean Name Function (when true)
amazonInstallsEnabled Allow installs from Amazon Appstore.
checkLPF Disable app if Lucky Patcher installed.
checkStores Disable app if third-party app store(s) installed.

Use the License Checker

The license checker disables your app if it’s been pirated. In Google Play Console, go to Monetisation Setup. Copy the license key and replace the default string (MIIBI . . .) with your API key in the following:

override fun getLicKey():String? = "MIIBIjANBgkqhkiGgKglYGYGihLuihUuhhuBlouBkuiuBIyvYV"

Disable License Checker

By default, the license checker is disabled in debug builds. To turn it off entirely, find the following:

override fun getLicenseChecker():PiracyChecker? {
    destroyChecker() ...
    return if (BuildConfig.DEBUG) null else super.getLicenseChecker()
}

Replace the third line with return null:

override fun getLicenseChecker():PiracyChecker? {
    destroyChecker() ...
    return null
}
Clone this wiki locally