-
-
Notifications
You must be signed in to change notification settings - Fork 174
Using Google Play Licensing (LVL)
Javier Santos edited this page Mar 19, 2017
·
1 revision
Google Play offers a licensing service that lets you enforce licensing policies for applications that you publish on Google Play. With Google Play Licensing, your application can query Google Play to obtain the licensing status for the current user.
Any application that you publish through Google Play can use the Google Play Licensing service. No special account or registration is needed.
In order to retrieve your BASE64 license key your app must be uploaded to the Google Play Developer Console. Then access to your app -> Services and APIs.
For more information check out the Google Developers page.
public class MainActivity extends AppCompatActivity {
private PiracyChecker checker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
verify();
}
private void verify() {
checker = new PiracyChecker(this)
.enableGooglePlayLicensing("BASE_64_LICENSE_KEY")
//.enableUnauthorizedAppsCheck()
//.enableDebugCheck();
// Add as many library customizations as you want
checker.start();
}
@Override
protected void onDestroy() {
super.onDestroy();
checker.destroy();
}
}