I have to embed a game written in flash into my Android project.
The game is developed with Adobe AIR. And the team developing this game has send me a *.apk with Captive runtime included. I know that you can export apk from Adobe Flex.
But, what if i what to add swf game to my existing project in one of it's Activities? How do i embed a Captive runtime to my Android project and how do i setup activity that it's shows my game?
OK,
When you build an Android APK
from Adobe Air
its an application by itself and has its own activity (.AppEntry
) which is launched by the Air
runtime bootstrapper.
You cannot Add my swf to an Android Activity because all flash code is embedded in an APK is launch from the install Activity.
Adobe air compiles swf
code in classes.dex
and adds resources and manifest to the APK. The Captive runtime just adds a huge core lib that is almost 17 megs uncompressed. This lib contains the flash and Air runtime so your use does not need to install any AIR runtime lib separately.
Note* Captive runtime builds are minimal 8 Megs
and thats compressed with the captive runtime.
You must take your game and create and Adobe Air release version which packages it up in the Android APK using the Adobe AIR SDK. Once installed you can communicate with the other APK using a variety of methods(custom URL, files, Broadcaster receiver via ANE, etc).
I hope that helps!