Android 硬件和 Adobe AIR
你们知道使用 Adobe 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您无法从 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 ...