Preprocess AndroidManifest.xml ?

by Kevin TeslaCoil Software » Thu, 31 Mar 2011 03:23:04 GMT

Sponsored Links
 With all these Markets, apks are starting to get more complicated. I'm
taking the approach of a different APK for different Markets.
There's some permissions I need in some cases and not in others. Like:

It doesn't hurt anything to have it on the Amazon store (And they
haven't rejected for it), but it's unnecessary.
I also have a direct-purchase option and I want to use,
READ_PHONE_STATE. I don't want to include this permission when it's
unnecessary for the Google Market or Amazon Appstore.

The idea in my head is having an AndroidManifest.xml like:

    <uses-permission android:name="" /
android:name="android.permission.READ_PHONE_STATE" />

Then run AndroidManifest.xml through cpp. This would mean I could
compile debug builds with Eclipse easily, and they'd just have all
permissions. But when using Ant I could limit it to just one Market's
(I'm handling actual java code with a static final int MARKET_TYPE
deal that gets set by ant)

Anyone know of anything like this that already exists? Anyone know why
this is a horrible idea and I shouldn't pursue it?



Re: Preprocess AndroidManifest.xml ?

by joebowbeer » Fri, 01 Apr 2011 06:53:32 GMT

 Preprocessing is doable.  The downside is that preprocessing is not
supported directly by the Eclipse ADT.  (Btw, I like the NetBeans
preprocessor and its support for configurations, and it would be great
to have first-class Android support in NetBeans as well.)

But I digress.

An option that is directly supported in Eclipse is Library Projects.
In theory, you can move all of your code and resources to a shared
library project.  Then create two client projects: one for Android
Market and one for Amazon Appstore.  These projects would use the
library project, but add their own custom AndroidManifest.xml.

On Mar 30, 12:22pm, Kevin TeslaCoil Software <>


Sponsored Links

Other Threads

1. How to provide appwidget add capability/automatic adding in user screen


I am trying to provide the 'add appwidget' functionality similar to
home screen within my application screen but no luck.

I launch the intent AppWidgetManager.ACTION_APPWIDGET_PICK within my
application, which then requires
(mAppWidgetManager .getInstalledProviders()) and then it looks for
AppWidgetManager.EXTRA_CUSTOM_EXTRAS which I dont know what to provide


2. highlight part of the word in text view

how can i highlight only few letters in the word in text view?


3. Accessing Android's External DB(Created by Android media app) using Native code.

4. Selecting and Highlighting an item in an array list by code

5. screenBrightness of 0.0 == ???

6. Problem installing Cupcake OS update on ADP1

7. Unsure of SimpleCursorAdapter ? Need help