August 25th, 2010, 02:42 AM
Thread Author (OP)
Join Date: Jun 2010
Location: Chicago, IL
Carrier: Not Provided
Thanked 0 Times in 0 Posts
So I figured out why it was crashing... I didn't notice that I had to put my public key where it obviously said "PUT YOUR PUBLIC KEY HERE". Other than that it works now.
My next question is what part do I actually need to put in my application from the sample? Do I need the whole MainActivity Activity and have that run first? Or should I just add a certain port of the activity?
My guess is making that Activity just a normal class (NOT extending activity, so there's no onCreate, but instead a constructor), and put everything that's in onCreate() but in the constructor
public class MyLicense
mHandler = new Handler();
// Try to use more data here. ANDROID_ID is a single point of attack.
String deviceId = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
// Library calls this when it's done.
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
// Construct the LicenseChecker with a policy.
mChecker = new LicenseChecker(
this, new ServerManagedPolicy(this,
new AESObfuscator(SALT, getPackageName(), deviceId)),
// ... all other functons in the sample's code
Does that do everything I need to do for license checking?
Do I need all that?
Last edited by Leolicos; August 25th, 2010 at 02:46 AM.