I have created an AIR app on windows which uses fl开发者_运维知识库ex as front end, and c++ native binaries at back end. The two are loosely coupled, and communicate with the help of flex NativeProcessEvents.
As a next step I want to port the same app over android. I do not have any prior experience of Android development, but I understand that Flex 4.5 has a good support for Android. But from whatever I read so far, the C/C++ support for Android is limited. Android NDK seems to be a way to communicate b/w native Android Apps and c++ code, but I am not clear whether it also allows to compile "legacy c++" code to "c++ only" binaries. Is it possible?
Any links/examples on this would greatly help.
Regards, Kapil
You have a few options.
The first is to re-write your C++ code to some server based language. Visual C++ and .NEt seems like a likely candidate beacuse you should be able to reuse much of your C++ code in the port.
You may want to investigate Native Extension feature that was announced for AIR 3.0. I believe you should be able to port your C++ code over to a Native Extension to expose that to the AIR app running on Android. I'm unclear if you'll have to rewrite the C++ code in Java.
AIR 3 is in release candidate stage as a few days ago, so I Expect a formal release is right around the corner.
Android's NDK is totally capable of running arbitrary C and C++ code. The real question would be the interface between AIR and C++ - unfortunately I don't have any experience with Flex on Android.
精彩评论