Android hardware and Adobe AIR

半世苍凉 提交于 2019-12-11 16:42:16

问题


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!


回答1:


No you can't access native API from AIR.

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



来源:https://stackoverflow.com/questions/4889376/android-hardware-and-adobe-air

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!