是否可以在纯 java android 应用程序中嵌入 flex 组件? [英] Is it possible to embed a flex component in a pure java android application?

查看:21
本文介绍了是否可以在纯 java android 应用程序中嵌入 flex 组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以使用 AIR for android 开发完整的 flex 应用程序,但我需要的是将 flex 组件嵌入到现有的经典 java android 应用程序中.

我在 Java 中找到了一些 Flash 播放器,但它们都需要 JFrame 或包含特定的 Windows dll.

有可能吗?我在网上没有找到有关此的信息

谢谢

解决方案

我只能想到三种让 flex 出现在非 AIR android 应用程序中的方法:

  1. 如果有一个原生 Android 库或组件能够为您的目的渲染足够好的 Flash,或者类似的库知道如何解析和渲染 MXML(和 AS3)
  2. 如果您的应用可以嵌入 HTML 视图,然后显示一个带有嵌入 Flash 的页面,该页面显示您的组件(手机需要是 Android 2.2 并安装了 Flash)
  3. 如果您的 Android 应用程序可以直接嵌入 Flash 播放器(如果已安装),或直接嵌入 AIR 应用程序,则 Windows 应用程序可能嵌入 ActiveX 组件的方式

方法 2 将是快速的方法,如果它有效 - 对我来说似乎可行,但我从未尝试过.使用方法 1,理论上这些事情在技术上应该是可行的,但我不知道有任何现有的库可以满足您的需求.第三个选项进入了黑客领域——我认为 Flash 或 Android 文档都不会帮助你,但它很有可能......如果可能的话,它可能是最强大的解决方案.

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

解决方案

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.

这篇关于是否可以在纯 java android 应用程序中嵌入 flex 组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆