[android-developers] Re: Building different versions of an app -- best practice?

2009-04-28 Thread Raphael
Another approach would be to package the extract functionality as different activities and services, in a completely new APK. Users would install the "lite" free version and then when they want more features they can pay and install the extra package. Using the PackageManager or via Intents you

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-27 Thread Martinus
Maybe you can build your app using Maven or Ant? I think it should be possible to configure building both a free app and a paid app based on the same source. Even package renaming and all that can be handled. On Apr 21, 11:34 am, jarkman wrote: > For what it is worth, the 1.5 SDK does move the R

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-21 Thread jarkman
For what it is worth, the 1.5 SDK does move the R.java out into a different directory (myProject/gen/com.needle.noo), which may solve one of your problems. But I don't see how you'd get round having the package name in all the source files (or, at least, in all the activities & so on) without int

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-21 Thread Jon Colverson
On Apr 20, 1:23 pm, Mariano Kamp wrote: > But isn't the real problem that you would need a totally different > package name to upload it to the Android Market? I'd love to hear if anyone has an elegant solution for this. Mine is very ugly: I have one manifest file for my full version and one of

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-20 Thread Edward Falk
On Apr 20, 6:58 am, jarkman wrote: > We actually maintain two separate codebases for our pro and light > products ... Yuck. I was afraid that would be the answer. I don't know what Sun was thinking when they decided to have no pre-processor for Java. I'll try the "if (FREE_VERSION)..." appro

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-20 Thread Edward Falk
Yes, I'll probably do it that way if I can't find another way. Problem is that I also want to remove a lot of code from a case() statement, remove a lot of functions that won't be called, and remove a lot of resources. Are we sure that the Java compiler will actually remove the dead code? I cou

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-20 Thread jarkman
We actually maintain two separate codebases for our pro and light products, and take care to port common changes across from one to the other. They need different package names in the manifest file, in the layout xml when we refer to custom controls, in the package declaration at the top of each s

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-20 Thread Mariano Kamp
But isn't the real problem that you would need a totally different package name to upload it to the Android Market? On Mon, Apr 20, 2009 at 2:04 PM, MrSnowflake wrote: > > You can use if-else constructs, as the compiler will leave out any > never reached peaces of code. > > Define a var to check

[android-developers] Re: Building different versions of an app -- best practice?

2009-04-20 Thread MrSnowflake
You can use if-else constructs, as the compiler will leave out any never reached peaces of code. Define a var to check against: public static final boolean FREE_VERSION = false; and when you want to check: if (FREE_VERSION) { // This code won't end up in the final binary } else { // Only thi