Discussion Forums  >  Uncategorized

Replies: 4    Views: 570

flane1shot
Aspiring developer
Profile
Posts: 5
Reg: Dec 26, 2010
USA
50
01/03/11 02:14 PM (15 years ago)

integrating the android vending licencing

I'm creating an app to sell on the android market (and hopefully Iphone as well) and will have a few more to do in the future. As a newbie to eclipse and programming in general. I am having trouble following the instructions on the android DEV Guide. http://developer.android.com/guide/publishing/licensing.html#ServerManagedPolicy I get to Implementing an obfuscator and it starts to loose me. Mainly I just don't know where it specifically is telling me to input the information in my activity is that the manifest? Can anyone help me figure this out. If you have an example of what it should look like I would appreciate it. Thanks
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/03/11 02:35 PM (15 years ago)
What is your question? Funny. I don't know anything about implementing an obfuscator so I'm not sure where give advice. What are you trying to obfuscate anyway? An activity is not a Manifest. The Manifest file is what Eclipse, the Android Market, and the Device use to differentiate your app from all the others.
 
flane1shot
Aspiring developer
Profile
Posts: 5
Reg: Dec 26, 2010
USA
50
like
01/03/11 03:17 PM (15 years ago)
it turns out if you use the Android market licensing each time someone downloads your app from the android market the licensing embedded in your app asks for an authentication from you device. The info is stored on the phone and for people not to hack it and give your app away with the correct response when the server asks for it. If you could follow my rambling that is the general gist of why you obfuscate the data that is stored and sent in response. My question is where does the following go (into what activity). Below is the excerpt from the android DevGuide. To use AESObfuscator, first import it to your Activity. Declare a private static final array to hold the salt bytes and initialize it to 20 randomly generated bytes. ... // Generate 20 random bytes, and put them here. private static final byte[] SALT = new byte[] { -46, 65, 30, -128, -103, -57, 74, -64, 51, 88, -95, -45, 77, -117, -36, -113, -11, 32, -64, 89 }; ... Next, declare a variable to hold a device identifier and generate a value for it in any way needed. For example, the sample application included in the LVL queries the system settings for the android.Settings.Secure.ANDROID_ID, which is unique to each device. Note that, depending on the APIs you use, your application might need to request additional permissions in order to acquire device-specific information. For example, to query the TelephonyManager to obtain the device IMEI or related data, the application will also need to request the android.permission.READ_PHONE_STATE permission in its manifest. Before requesting new permissions for the sole purpose of acquiring device-specific information for use in your Obfuscator, consider how doing so might affect your application or its filtering on Android Market (since some permissions can cause the SDK build tools to add the associated ). Finally, construct an instance of AESObfuscator, passing the salt, application identifier, and device identifier. You can construct the instance directly, while constructing your Policy and LicenseChecker. For example: ... // Construct the LicenseChecker with a Policy. mChecker = new LicenseChecker( this, new ServerManagedPolicy(this, new AESObfuscator(SALT, getPackageName(), deviceId)), BASE64_PUBLIC_KEY // Your public licensing key. ); ... For a complete example, see MainActivity in the LVL sample application.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/03/11 03:40 PM (15 years ago)
Interesting. It sounds to me like you will need to obfuscate all the source-code in all the files. This makes no sense but is doable technically. There are lots of activities in your project, I can't image that each one will need to be modified to do what you are asking. Possible, just havn't heard of this process before. I can say that many thousands of apps are powered by the buzztouch back-end and this is the first time I've heard of this. I'll look into it later and report back.
 
flane1shot
Aspiring developer
Profile
Posts: 5
Reg: Dec 26, 2010
USA
50
like
01/03/11 04:05 PM (15 years ago)
Its possible that nobody is protecting their apps but i thought it would be prudent to learn how to do. The next few apps that I create have the potential to sell very well and be passed around if not protected. PS for anyone out there I really like buzztouch for crating the apps it works awesome.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.