Hi Mattaku (or anyone else who can help)

I am trying a similar approach. All my code (trial and full) is in a
single codebase. A set of preferences (set differently in the two
versions) determine whether the app behaves as a trial or as a full
app. In order to create two apk's out of this, I put all the code into
com.appcore.* packages. I then create com.appfull and com.apptrial
packages and place the respective android manifest files there. I make
the necessary changes to the manifest to make all the relative package
names in the manifest absolute. Now when I build say appfull in
eclipse, the issue I have is that R.java gets generated into
com.appfull, and all the classes in com.appcore.* are unable to refer
to R.layout objects because R is no longer in the same package
structure as themselves. I tried physically moving  the generated
R.java into com.appcore but didnt have any success with that, plus
thats not an elegant solution anyway.

The other issue is how do I get com.appfull to invoke/refer-to
com.appcore so that when I build, it will include both com.appfull and
com.appcore in the apk.

If you can share a more complete how-to on the appcore/appfull/applite
scheme you are using (or post the code somewhere), that would be very
helpful.

Thanks
Jay

On Feb 18, 8:57 pm, Mattaku Betsujin <mattaku.betsu...@gmail.com>
wrote:
> I have two APK files. One in com.foo.appfull package, the other in
> com.foo.applite package.
>
> On Wed, Feb 18, 2009 at 4:36 PM, jarkman <jark...@gmail.com> wrote:
>
> > Thanks - so did you define your activities in com.foo.appcore, or do
> > they have to be in the com.foo.applite/appfull packages ?
>
> > On Feb 18, 9:36 pm, Mattaku Betsujin <mattaku.betsu...@gmail.com>
> > wrote:
> > > What I did was:
>
> > > Put most of the functionality in a single package, say: com.foo.appcore
>
> > > Then, each version of the app will be in a different package
>
> > > com.foo.applite
> > > com.foo.appfull
>
> > > In development, I put the full version in Eclipse (i.e., appcore and
> > > appfull), so it's easy to build and debug all the source code.
>
> > > To build applite, I use a Makefile -- I tried ant, but it's just not as
> > > flexible as make.
>
> > > I got all that to work, and then I decided to make my program open-source
> > so
> > > all that was a waste of time :-)
>
> > > On Wed, Feb 18, 2009 at 10:50 AM, jarkman <jark...@gmail.com> wrote:
>
> > > > We're thinking about building light and paid versions of our app for
> > > > the Market. But I am not clear what we need to do, or how to do it.
>
> > > > (1) Do we definitely need the two versions to have different package
> > > > names for the two builds ?
>
> > > > It seems logical to do it that way, but I have not found a clear
> > > > answer from Google to that question. Though I have found several
> > > > people asking the same question.
>
> > > > (2) Is there any support in Eclipse for building two similar apps with
> > > > different package names from the same java and xml files ?
>
> > > > In most of the IDEs I've used, it is a doddle to define multiple build
> > > > targets for one project, but none of those mechanisms seem to be
> > > > present here. And, the package name is embedded in every java file, as
> > > > well as in many places in the manifest, leaving me without a tidy way
> > > > to build to alternate package names.
>
> > > > Is there a tidy way to build multiple version ? Or are we really going
> > > > to end up copying the whole codebase and search-and-replacing the
> > > > package name ?
>
> > > > Thanks,
>
> > > > Richard
--~--~---------~--~----~------------~-------~--~----~
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