2

I'm writing an Android app, and would like to have a Lite and Pro version. The application itself would largely be the same for the Lite and Pro version, the main difference being that the Pro version would have a widget for convenience purposes. Obviously, I would like to reuse the code, drawables and layout files for the common parts in both applications, without having to create to projects. I thought I would be able to create two application tags in the manifest file, one without and one with the receiver for the widget. However, I don't see how I could create two packages from this. Is there a way to accomplish what I try to do? Am I looking in the correct direction, or are there more efficient ways?

I could of course create a common java package that I can reuse, but then I would still need two separate projects with the same drawables and layout.

Any ideas?

Bart

masschel
  • 21
  • 1
  • 2

3 Answers3

0

Use Android package renaming in order to have two different packages (Lite and Pro version), i.e. the same application with different AndroidManifest.xml files in one project. See https://stackoverflow.com/a/4426654/1173350

Community
  • 1
  • 1
0

You can simply make 2 Manifest and put into the package the one you want.

Simply remove the widget activities declaration for the lite version.

ykatchou
  • 3,667
  • 1
  • 22
  • 27
  • That was indeed another option. I did not look into this in too much detail yet, but is there a way to tell Eclipse to use either AndroidManifest_Lite.xml or ___Pro.xml to create the package? Using a pre-build command to rename either file to AndroidManifest.xml, for example? – masschel Nov 04 '10 at 23:10
0

Maybe you could see Touiteur behavior on managing pro & lite version for widget... On lite version, you can put the widget on home screen, but not displaying data, instead this text "Widget are available only in the Premium version. Visit Android Market to get Touiteur Premium"...

So it still 1 project.... the only thing you only need change 1 flag to activate the feature in the widget.. :)

Tek Yin
  • 3,011
  • 3
  • 25
  • 42