Is it possible to embed a flex component in a pure

2019-05-23 09:17发布

问题:

I know it is possible to develop a full flex application using AIR for android but what I need is to embed a flex component into an already existing classic java android application.

I found some flash players in java but they all either require a JFrame or include of specific windows dlls.

Is it even possible ? I found no info on the net about this

Thanks

回答1:

I can only think of three ways you might get flex to show up inside an non-AIR android app:

  1. If there was a native Android library or component that was capable of rendering Flash well enough for your purposes, or similarly a library that knew how to parse and render MXML (and AS3)
  2. If your app could embed an HTML view, which in turn displayed a page with embedded Flash that showed your component (the phone would need to be Android 2.2 and have Flash installed)
  3. If your Android app could directly embed the Flash player (if it's installed), or directly embed an AIR application, the way a windows app might embed an ActiveX component

Approach 2 would be the quick way, if it works - it seems feasible to me, but I've never tried it. With approach 1, such things ought to be technically possible in theory, but I don't know of any existing libraries that do what you'd need. The third option gets into hackish territory - I don't think that either Flash or Android docs will help you with it, but it could very well be possible... And if it is possible, it's probably the most robust solution.



回答2:

Here is an example application with Flex and Android.