Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App ID prefix problem

I am building an Adobe Air for Android App and I have a big problem, i published an app to the android market using an old flash air extension that saved the app id with a prefix 'app.'

Now that i have upgraded the extension it now saves the app id with a prefix 'air.'

What this means is that I can no longer publish updates to my applications; so what can I do?

The problem with using the outdated extension is that after publishing the update the user is not able to open the app until the cache files are cleared.

like image 786
jason Avatar asked Mar 03 '26 04:03

jason


1 Answers

There is a simple environment variable you can set to disable the air. prefix easily. The following code exists in the Adobe AIR packager:

String optOut = System.getenv("AIR_NOANDROIDFLAIR");
if ((optOut == null) || (optOut.indexOf("true") == -1)) {
  packageName = "air." + packageName;
}

So, simply set the AIR_NOANDROIDFLAIR environment variable to true, repackage your application, and it won't have the air. prefix. Google how to set environment variables in windows or mac for your particular OS version.

For example, I use the command-line compiler on Mac/Linux, so I run:

> export AIR_NOANDROIDFLAIR=true
> java -jar $AIR_HOME/lib/adt.jar -package -target apk-captive-runtime -storetype pkcs12 -keystore cert.p12 -storepass *** Main.apk Main-app.xml Main.swf

Warning: I don't know what implications this has. Per someone's note above, this may only be a good idea with captive runtime (but that's the default going forward from AIR 3.8).

Update: Renaun Erickson said this flag shouldn't cause problems.

Cross-posted here (slightly different question, same answer).

like image 135
Jeff Ward Avatar answered Mar 05 '26 16:03

Jeff Ward