[android-developers] Re: How to manage 2 versions of the same app: a lite version and a full version?

2009-09-30 Thread mjc147

So if you have three different projects (each with their own package)
then you have three different generated R files. So the generic
project uses its own R.java and the pro project uses its own R.java
AND the R.java for the generic project.

I'm not sure I understand the problem - maybe because I haven't tried
this out. Can someone please explain a specific example?

On Sep 3, 4:41 pm, Datoh dato...@gmail.com wrote:
 Hi,

 I want to use the same eclipse project to maintain only one source
 code (or two projects that refer to a generic project).
 My problem is that the names of the package have to be different on
 the market (eg: my.android.app.lite and my.android.app.pro).
 If the package names are differents, the generated java ressource
 files are differents (eg: my.android.app.lite.R.java and
 my.android.app.pro.R.java).
 So, the source files must point to differents R files according to the
 version (pro or lite) and I have to change all the import...

 Do you know how can I deal with that?

 Thanks,
 Cedric.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to manage 2 versions of the same app: a lite version and a full version?

2009-09-30 Thread Dianne Hackborn
If someone wants to add an option to aapt to rewrite the .apk to have a
different package name than the one in the manifest, I'd love to review it.
This is a little tricky -- you need to rewrite the manifest's components and
such to also work with the new package -- but should be quite doable.

And the nice thing for this kind of stuff is that you don't need to wait for
it to ship on a device to use it. ;)

On Tue, Sep 29, 2009 at 11:18 PM, mjc147 westmead...@yahoo.co.uk wrote:


 So if you have three different projects (each with their own package)
 then you have three different generated R files. So the generic
 project uses its own R.java and the pro project uses its own R.java
 AND the R.java for the generic project.

 I'm not sure I understand the problem - maybe because I haven't tried
 this out. Can someone please explain a specific example?

 On Sep 3, 4:41 pm, Datoh dato...@gmail.com wrote:
  Hi,
 
  I want to use the same eclipse project to maintain only one source
  code (or two projects that refer to a generic project).
  My problem is that the names of the package have to be different on
  the market (eg: my.android.app.lite and my.android.app.pro).
  If the package names are differents, the generated java ressource
  files are differents (eg: my.android.app.lite.R.java and
  my.android.app.pro.R.java).
  So, the source files must point to differents R files according to the
  version (pro or lite) and I have to change all the import...
 
  Do you know how can I deal with that?
 
  Thanks,
  Cedric.
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to manage 2 versions of the same app: a lite version and a full version?

2009-09-03 Thread feeling3_4

http://dev.bostone.us/2009/05/02/android-how-to-deploy-multiple-versions-of-the-same-app/

this may help you.

On Sep 3, 4:41 pm, Datoh dato...@gmail.com wrote:
 Hi,

 I want to use the same eclipse project to maintain only one source
 code (or two projects that refer to a generic project).
 My problem is that the names of the package have to be different on
 the market (eg: my.android.app.lite and my.android.app.pro).
 If the package names are differents, the generated java ressource
 files are differents (eg: my.android.app.lite.R.java and
 my.android.app.pro.R.java).
 So, the source files must point to differents R files according to the
 version (pro or lite) and I have to change all the import...

 Do you know how can I deal with that?

 Thanks,
 Cedric.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to manage 2 versions of the same app: a lite version and a full version?

2009-09-03 Thread Chris Stratton

  I want to use the same eclipse project to maintain only one source
  code (or two projects that refer to a generic project).
  My problem is that the names of the package have to be different on
  the market (eg: my.android.app.lite and my.android.app.pro).

 http://dev.bostone.us/2009/05/02/android-how-to-deploy-multiple-versi...

 this may help you.

If that's the stock solution, then I do vote for sed... was holding
out hoping there'd be some kind of magic possible with eclipse or ant.

At any rate, what will work and is ugly but entirely script-able:

copy the project tree
cd to the top level of the copy
sed -i s/my\.android\.app\.pro/my.android.app.lite/g `find . -type
f`
mv src/my/android/app/pro src/my/android/app/lite
+flip whatever switch reduces the functionality
rebuild (the above probably will not have fixed an eclipse project...
that may still need adjustment)

In terms of cleaner solutions... the file base/build/jarjar-rules.txt
in the android sources seems to be an instruction to *something* to
rename a collection of packages at build time, but I don't know what
it instructs

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to manage 2 versions of the same app: a lite version and a full version?

2009-09-03 Thread Pieter

In my experience, a complete package rename in all your classes is not
necessary. You do need to change the package attribute in the
manifest tag in your manifest file. We use an ant filter to do this
in our build script. In this manifest file, use absolute fully
qualified classnames (not starting with '.') for any class references
(like activity classes service classes, etc.).

You can also use this technique to change the label attribute in you
manifest tag, giving each version a unique name.

I think that is about it. We used this technique to deploy three
versions of SpecTrek: ADC2, Full, and Light. Sofar without any
problems ;-)

On Sep 4, 3:42 am, Chris Stratton cs07...@gmail.com wrote:
   I want to use the same eclipse project to maintain only one source
   code (or two projects that refer to a generic project).
   My problem is that the names of the package have to be different on
   the market (eg: my.android.app.lite and my.android.app.pro).
 http://dev.bostone.us/2009/05/02/android-how-to-deploy-multiple-versi...

  this may help you.

 If that's the stock solution, then I do vote for sed... was holding
 out hoping there'd be some kind of magic possible with eclipse or ant.

 At any rate, what will work and is ugly but entirely script-able:

 copy the project tree
 cd to the top level of the copy
 sed -i s/my\.android\.app\.pro/my.android.app.lite/g `find . -type
 f`
 mv src/my/android/app/pro src/my/android/app/lite
 +flip whatever switch reduces the functionality
 rebuild (the above probably will not have fixed an eclipse project...
 that may still need adjustment)

 In terms of cleaner solutions... the file base/build/jarjar-rules.txt
 in the android sources seems to be an instruction to *something* to
 rename a collection of packages at build time, but I don't know what
 it instructs
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---