Reputation: 3608
Adobe recently announces its new release for Air SDK 3.8. So we have used this for our mobile application to be able to use ServerSocket
API which is used by our created library. Upon exporting the release build, the apk
size becomes 13.3MB
which is quite bigger compared to 3.2MB
(using the default Flex SDK 4.6
with Air 3.1
).
When I overlay AIR SDK 3.8 on Flash Builder 4.6, I do the following:
sudo ditto AdobeAirSDK/ /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0\ + \3.8/
<application xmlns="http://ns.adobe.com/air/application/3.8">
Have I misconfigured something? Reverting back to 3.1
exports 3.2MB
.
If I will be using Air SDK 3.1
and will run my app on an Android device with Air 3.8
runtime, will ServerSocket
still work?
When I export a release build for iOS
, there's no difference on its ipa
size. When using 3.1
, ipa size is 11.9MB
; using 3.8
still yields 11.9MB
. So what happens to Android
releases on AIR SDK 3.8
?
It's kinda strage that the apk
size is greater than the ipa
size. When exporting for iOS
release, 8MB - 10MB
is added to the app size since the application exported has a captive runtime (iOS does not support shared AIR Runtime). So what happens to Android
releases on AIR 3.8
?
On exporting a release build for android, captive runtime is always included no matter what you choose on Export Options (Export application with captive runtime or Export application that uses a shared AIR runtime). Well, the good thing about captive runtime is that you don't have to require your user to install Adobe Air.
Upvotes: 0
Views: 4108
Reputation: 4870
Adobe changed the packaging for Android in AIR 3.7. Android packages are now standard captive-runtime and the packager will warn you with something like this:
Note: the AIR SDK no longer supports packaging android applications for use with the shared Runtime.
The application has been packaged with a captive Runtime`
From the documentation (http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac-4f1413de12cd45ccc23-8000.html):
Note: (AIR 3.7 and higher) By default, ADT packages a captive copy of the AIR runtime with your Android app. To force ADT to create an APK that uses an external runtime, set the AIR_ANDROID_SHARED_RUNTIME environment variable to true.
I have not tried to set that variable myself so I don't know if that actually enables you to package normally.
Upvotes: 3
Reputation: 8149
3.1 doesn't support "Captive Runtime", which was added in 3.3, I believe. Captive Runtime allows you to run the application on any Android device, even if they do not have Adobe AIR installed on device. That comes with the downside of larger APK sizes, but it means your app is much more usable in the long run. Depending on AIR version, it adds between 8 and 10MB to the APK size since you are including the AIR runtime with your application
You can turn Captive Runtime on/off when you "Export Release Build" in Flash Builder, or similar in Flash Develop or Flash Pro. See the export options below:
And no, you cannot use any socket technology in AIR mobile prior to 3.8 which finally added the ability. If you build with 3.1, none of your socket code will work. I'm unsure how they handled not supporting it, but it may not even compile if you included socket code in the project (the classes may be missing for mobile projects prior to 3.8)
Upvotes: 0