Search code examples
flashairair-native-extension

Flash CC Air for mobile stripping Native extensions from app. xml


I have recently been handed a legacy AIR for mobile project built with Flash CC and AIR 15.

The project has a few native extension libraries that are shown in the publish settings under libraries like so:

enter image description here

My app_android-app.xml

looks like this before i publish:

    <?xml version="1.0" encoding="utf-8" standalone="no" ?>

<application xmlns="http://ns.adobe.com/air/application/15.0">
  <id>com.mypackage.cfsidekick</id>
  <versionNumber>1.1.4</versionNumber>
  <versionLabel/>
  <filename>SHOP!</filename>
  <description>

  </description>
  <name>
      <text xml:lang="en">SHOP!</text>
      <text xml:lang="fr">SHOPPING ULTIME!</text>
  </name>
  <copyright/>
  <initialWindow>
    <content>app_android.swf</content>
    <systemChrome>standard</systemChrome>
    <transparent>false</transparent>
    <visible>true</visible>
    <fullScreen>false</fullScreen>
    <aspectRatio>portrait</aspectRatio>
    <renderMode>cpu</renderMode>
    <softKeyboardBehavior>pan</softKeyboardBehavior>
    <autoOrients>false</autoOrients></initialWindow>
    <icon>
    <image36x36>icon/Shop_36x36.png</image36x36>
    <image48x48>icon/Shop_48x48.png</image48x48>
    <image72x72>icon/Shop_72x72.png</image72x72>
    <image96x96>icon/Shop_96x96.png</image96x96>
  </icon>
    <customUpdateUI>false</customUpdateUI>
    <allowBrowserInvocation>false</allowBrowserInvocation>
  <android>
    <manifestAdditions><![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>

<application>
  <activity android:name="com.facebook.LoginActivity" 
  android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="Login"/>
  <provider android:authorities="com.facebook.app.NativeAppCallContentProviderSOMENUMBER" 
  android:name="com.facebook.NativeAppCallContentProvider" />
  <meta-data android:name="com.blueband.cfsidekick.ApplicationId" android:value="SOMENUMBER"/>
</application>

</manifest>]]></manifestAdditions>
  </android>
  <supportedLanguages>en fr</supportedLanguages>

  <extensions>
    <extensionID>com.freshplanet.AirAlert</extensionID>
    <extensionID>com.milkmangames.extensions.GoViral</extensionID>
  </extensions>
</application>

But when i publish none of the extensions exist in the file anymore and none of the ANEs work.

the resulting app_android-app.xml looks like this after build:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<application xmlns="http://ns.adobe.com/air/application/15.0">
    <id>com.mypackage.cfsidekick</id>
    <versionNumber>1.1.4</versionNumber>
    <versionLabel></versionLabel>
    <filename>CF SHOP!</filename>
    <description>

    </description>
    <name>
        <text xml:lang="en">SHOP!</text>
        <text xml:lang="fr">SHOPPING ULTIME!</text>
    </name>
    <copyright></copyright>
    <initialWindow>
        <content>app_android.swf</content>
        <systemChrome>standard</systemChrome>
        <transparent>false</transparent>
        <visible>true</visible>
        <fullScreen>false</fullScreen>
        <aspectRatio>portrait</aspectRatio>
        <renderMode>cpu</renderMode>
        <softKeyboardBehavior>pan</softKeyboardBehavior>
        <autoOrients>false</autoOrients>
    </initialWindow>
    <icon>
        <image36x36>icon/Shop_36x36.png</image36x36>
        <image48x48>icon/Shop_48x48.png</image48x48>
        <image72x72>icon/Shop_72x72.png</image72x72>
        <image96x96>icon/Shop_96x96.png</image96x96>
    </icon>
    <customUpdateUI>false</customUpdateUI>
    <allowBrowserInvocation>false</allowBrowserInvocation>
    <android>
        <manifestAdditions><![CDATA[<manifest><uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/><uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/><uses-permission android:name="android.permission.CAMERA"/></manifest>]]></manifestAdditions>
    </android>
    <supportedLanguages>en fr</supportedLanguages>
</application>

Does anyone know why?

I have not worked with flash in like 5 years and am lost.

any help appreciated.


Solution

  • Are you using Flash Pro CC as the IDE?

    If so could you check that in the target settings for Android > Permissions tab > that the 'Manually manage permissions' checkbox is ticked before you publish the app.

    Also, possibly move the ANE's to a new location on your drive and reset the paths to them in the Library Path pane.