Android 硬件和 Adob​​e AIR

发布于 2024-10-15 15:13:46 字数 386 浏览 9 评论 0原文

你们知道使用 Adob​​e Flash 构建的 Android 应用程序可以访问设备上的硬件 API 的方法吗?

例如,我启动 Flash CS5 并创建一个新的 AIR for Android 应用程序。该应用程序仅包含一个按钮。按下该按钮后,设备上的无线功能就会切换。在 Java 中,只需创建 wifiManager 即可轻松完成此操作:

WifiManager wifiManager = (WifiManager)this.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true/false);

但是在 AIR 应用程序中如何做到这一点呢?有可能吗?

谢谢!

Do any of you know a method that an Android application built using Adobe Flash can access hardware API on the device?

For example, I launch Flash CS5 and create a new AIR for Android application. The application consists only of a button. When that button is pressed the wireless on the device toggles. This is easy to do in Java by just creating a wifiManager:

WifiManager wifiManager = (WifiManager)this.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true/false);

But how would you do it in an AIR application? Is it even possible?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

日暮斜阳 2024-10-22 15:13:46

不,您无法从 AIR 访问本机 API。

但如果你真的想要它,有 一个 hack 来做到这一点......

No you can't access native API from AIR.

But if you really want it there's a hack to do this ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文