Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old August 23rd, 2010, 02:16 AM   #1 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Chicago, IL
Posts: 54
 
Device(s): G1
Carrier: Not Provided

Thanks: 4
Thanked 0 Times in 0 Posts
Leolicos
Default Licensing My Application

The sample application doesn't work for me... It crashes both in my emulator and on my G1 before it's even able to load the layout. I'm also not sure what it really does... I read the "Licensing your application" part on the site doc, but I'm still confused what really goes on and why it's important.

Leolicos is offline  
Reply With Quote
sponsored links
Old August 25th, 2010, 02:42 AM   #2 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Chicago, IL
Posts: 54
 
Device(s): G1
Carrier: Not Provided

Thanks: 4
Thanked 0 Times in 0 Posts
Leolicos
Default

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

Code:
public class MyLicense
{
   public 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)),
            BASE64_PUBLIC_KEY);
        doCheck();
    }
    // ... all other functons in the sample's code
Does that do everything I need to do for license checking?

Do I need all that?
Leolicos is offline  
Last edited by Leolicos; August 25th, 2010 at 02:46 AM.
Reply With Quote
Old September 27th, 2010, 11:11 PM   #3 (permalink)
Junior Member
 
Join Date: Jan 2010
Posts: 75
 
Device(s):
Carrier: Not Provided

Thanks: 2
Thanked 9 Times in 5 Posts
Default

I implemented this licensing in my app, and it seems super slow to me. Specifically, the AESObfuscator generates a secret key, and it is slow on my Hero (on the order of several seconds).

Is anyone else experiencing this? Thanks!
MrGreg is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:15 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.