2

I am going to release multiple versions of an app to the Android market / Google Play Store. Now I am looking into the best way to do this.

I've read a lot of questions here about how this is achieved in the easiest way. I do not want to create application version specific activities, because this could easily lead to code inconsistencies between the different versions. So I want to use the library approach. This also seems to be the easiest way, instead of all the examples I've seen which require hefty amounts of ANT scripting etc

For argument's sake I am going to have:

  • com.app.library
  • com.app.free
  • com.app.paid
  • com.app.paidmore

My idea is to base code in the library on the package name. Parts of my activities would not show, or disable functionality based only on package name. What are the downsides to this approach? I can't seem to find any, but I am curious about the opinions. Ofcourse all application versions would in a sense contain all functionality, but the functionality is disabled on the fly by code. I think it would be a lot of work to modify the code to hack the app to obtain full functionality, but am I right?

This approach seems wrong, in that it would be very easy to modify the apk and distribute it in the modified way.

Community
  • 1
  • 1
slinden77
  • 3,378
  • 2
  • 37
  • 35

1 Answers1

0

What are the downsides to this approach?

Your app winds up bigger than it needs to be (e.g., paid functionality residing on a free user's device). And, as you note, it puts all the functionality on the user's device.

I think it would be a lot of work to modify the code to hack the app to obtain full functionality, but am I right?

If it takes more than five minutes, the script kiddie is typing too slow. Decompile, search-and-replace your package name, recompile.

This approach seems wrong, in that it would be very easy to modify the apk and distribute it in the modified way.

That approach actually might take more time -- to perhaps ten whole minutes -- as it may take longer for the script kiddie to figure out exactly what resource needs changing.

Of course, the script kiddies can just grab your paidmore version and attack that, so the fact that your free and paid apps happen to have paidmore functionality is not much of a problem. So, the biggest difference IMHO is APK size, and only you'll know how much that differs between the versions and whether or not it's a problem.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • damn, totally overlooked that, silly! Well then I guess I will just define a `private final String PACKAGE_NAME` in each version and compare this with the name found by `PackageManager` before the app does anything. At least that will be obfuscated by ProGuard so it will be a bit less easy. Do you have any other ideas? And apk size could indeed be a problem, good point, but in my case it would make only a difference of maybe 50 kilobytes – slinden77 Dec 22 '12 at 16:53
  • @dmmh: "At least that will be obfuscated by ProGuard so it will be a bit less easy" -- the symbol will be, but the value will not be. "Do you have any other ideas?" -- as has been said many times, your problem will not be piracy, but obscurity. Worry about other problems first, like how you are going to market your app. – CommonsWare Dec 22 '12 at 17:18