How can I handle package names better while building a suite of android applications

I'm building a suite of applications, meaning that I have a single set of code that gets customized via a single change of an API key. This means that all of the applications have the same activities, same behaviors, but different icons, package names, and application names depending on the client I am building for.

Unfortunately, I haven't figured out a clean way to do this. Because the package name is what the Android Marketplace uses, I've been changing it to com.nilobject.productname.clientname. However, this changes the package for all of the activities to no longer be in the package of the application, since they live in "com.nilobject.productname." Additionally, the autogenerated "R" moves, so all of the references to R in com.nilobject.productname break.

Has anyone else dealt with this problem? I'm using Eclipse for development. Should I just refactor the activities with each build to be in the same package? Is there a system for this that I don't know about?

Thanks for any ideas and help!

-------------Problems Reply------------

I've been down this road with 3 different projects. One app needed "regular" and "pro" versions, another needed a versions of the same app for each of the US States, and another project involved delivering the same app to 3 different clients with each having slightly different graphics and colors.

Anyway, this is the approach that has worked best for me, and I've used it in all 3 of the multi-target projects I've been working on...

http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

Category:eclipse Views:0 Time:2010-05-11

Related post

  • How to change package name of an Android Application 2010-10-26

    My keystore is corrupt, therefore the Android Market is requiring me to rename the app and resubmit it. However, whenever I go to edit the package names in Manifest and throughout the files, it gives me tons of errors. What's the proper way to change

  • Multiple Android Application Package .apk files from single source code 2011-09-21

    I would like an Android build system procedure, command line or Eclipse, to generate several .apk files from a single source codebase. Some common reasons for this - having specific versions for markets with different requirements or a free and paid

  • How to solve Android Libraries custom attributes and package name remapping during build? 2011-11-10

    Over time our Android project has expanded a great deal, and these days we are creating multiple branded APKs from the same source tree. This has become challenging due to the package naming requirements of Android. We have all of our shared code in

  • How transaction should be handled while using Unit of Work pattern in a WinForm application 2009-02-14

    How transaction should be handled while using Unit of Work pattern in a WinForm application Should new UOW session be created when form is initialized? Disposed when form is exited? call UOW.commit() in every save? Please advice Any articles on this

  • How to get File within' package, in an Android application 2009-10-14

    I'm am creating an Android application, but in order to have one of the functionalities working I need to read a predefined xml file whilst only knowing its name, not the R.id.. In normal Java I know I can use getClass().getClassLoader().getResource(

  • Best way for adding packages I have the source code of to Android project with Eclipse 2010-11-21

    I am developing an Android application using Eclipse and APT. Now I need to use the package com.plancake.api.client that uses the org.json.simple package. I have downloaded them on my developer machine (they are on my Desktop for now): |-- com | `--

  • displaying the list of currently running task's packages and classes in my android application 2010-12-03

    here is the scenario that i want to display the list of currently running task's packages and classes in my android application,i have written a code but it is giving me run time error..can anyone help me to solve this.. Below is my code....is my ide

  • Add new test package to CTS and building 2011-05-05

    I already learned how to build the CTS and execute it. Now, I want to know the process of the CTS working flow. Can anyone explain it or share experience about how you add your test package in CTS then build the new CTS to test your application? I tr

  • Android application packaging 2011-07-26

    I have two android applications- A and B. I'm trying to package them as a single unit so that upon installation the system installs both apps. However, I could not find any reliable answer till now. In A's manifest file I added activity tag of B, res

  • When to use Handler/Message to communicate in android application 2011-10-04

    I can use Intent with data stored in extras to exchange information/ communicate between 2 android activities. When should I use Handler/Message to communicate in android applications? Thank you. --------------Solutions------------- Handlers are tied

  • Is there a handle leak detector which can be linked into an existing application? 2011-11-22

    I'm involved in various C++ projects (mostly using MSVC6 up to MSVC10) in which we recently found a few handle leaks (thread handles as given by the CreateThread function). I suspect that there are plenty of other handles being leaked as well and I'd

  • Handling record/entity level security in an ASP.NET MVC application 2011-11-23

    What is everyone doing to handle security (retrieval and modification) of individual records in an ASP.NET MVC application? This application has a Service/Business layer and a Data Access layer that are completely separate from the Web user interface

  • Automating creating NuGet package as part of build process 2012-02-07

    I have an automated build process that I'd like to extend so I can build the libraries I am distributing via NuGet. Currently, running nuget.exe to create the packages is a manual operation. What is the best way to setup VS 2010 so that my NuGet pack

  • Package manager for android application 2012-03-24

    I am developing an android application that has different types of content (text, audio, images). However, these contents are updated regularly in a server and must be updated to the android application. There is already a webservice on the server th

  • Default key event handler in an Android Application 2012-04-04

    Is there a way in Android where an android application when active will catch and process all key events (and maybe touch events) before they are delivered to the actual view which is supposed to be handling it? I know that we can have onKeyDown or s

  • How to handle packages provided Java using Eclipse P2 2010-02-26

    I got some OSGi bundles in binary form that declare dependencies to bundles like "org.ietf.jgss" which are provided by Java itself. P2 detects these dependencies and when I try to install the product later using the P2 director application the instal

  • Resolve conflicting package name in Flash Builder 2010-12-20

    I am using Flash Builder 4 and need a VideoDisplay component that works with Cue Points. The newer version of theOSMF classes that Flex's VideoDisplay are based on handles this already. The idea is to roll my own VideoDisplay component rather than mo

  • Android application Packages help? 2011-11-06

    Ok, so it might be a stupid question that is very obvious... anyway, I am making a new application and I wanted to know if I should make a package for every category of objects, for example: Monsters, PowerUps, Powers, FrameWork(where I make classes

  • How do I build project files and packages for Borland C++ Builder 5 from the command line? 2009-01-13

    How do I build Borland C++ project files (bpr) and package files (bpk) from the command line? Project groups (bpg) are apparently make files and can be compile with make. But bpks and bprs are xml based and the Export to Makefile won't compile with m

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.142 (s). 11 q(s)