Yes, I somehow also miss precompilation in Java ;-)

I suppose you could simply define a constant somewhere in your code like 
{{boolean Constant.FULLVERSION}} and then use
if(Constant.FULLVERSION) {
   // interesting code
}
else {
   throw new UnimlementedException("Please buy the full version");
}

(if you are new to java, rest calm: the java compiler will *not* produce 
bytecode for such dead code)


You can then easily publish two versions of your application, simply by 
changing the value of the constant and recompiling.

For multiple version, that could be an enumeration.

An alternative approach is to have the free version contain everything, with 
a method checking for a key instead of the constant, and then to sell an 
"unlock application" that simply provides a valid license.

Hope this helps
-- 
Régis

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to