I've been following the developer.android.com page http://developer.android.com/guide/publishing/licensing.html#lc-lcc for directions on using the ServerManagedPolicy type licensing. I've added the Google Market Licensing Package to my application as a library, and I've included this code in my onCreate method:
String deviceId = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
mChecker = new LicenseChecker(this, new ServerManagedPolicy this,
new AESObfuscator(SALT, getPackageName(), deviceId)),
BASE64_PUBLIC_KEY);
At this point I find the instructions confusing. Much of the rest of the sample code on the website appears to be for developing a StrictPolicy or a custom Policy. The example supplied with the library also appears to be for a custom Policy.
How much of the website code is required to use the ServerManagedPolicy library? For example, the library did not come with any resources, yet the website code for doCheck calls a button and text widget. Do i add the doCheck code and make widgets, or is this unnecessary if using the library?
Is there an example of the ServerManagedPolicy library used in an application that does something other than check a license?