Android 上的 Adobe Air Apps 是否接收系统事件?
我正在考虑使用 Adobe Air 为 android 市场编写应用程序。 我想知道是否有人可以告诉我在获取/处理系统事件方面有哪些限制(如果有的话)。 例如,如果用户收到短信,您可以暂停应用程序吗? 或者检测他们是否正在播放音乐并将您的应用程序的声音静音?
如果Air不能做到这一点,那就太可惜了。
我似乎在网上看不到任何东西 - 所以非常感谢您的帮助,如果有人发现任何东西。
I'm considering using Adobe Air to write an application for the android marketplace.
I was wondering if anyone could tell me what (if any) the limitations are with regard to getting / handling system events.
For instance can you pause the app if the user receives a text message?
Or detect if they have their music playing and mute your app's sounds?
It would seem a real pity if Air cannot do this.
I can't seem to see anything online - so thanks very much for your help if anyone finds anything out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅就 iOS 打包程序进行权威性讨论(并假设 apk 打包程序也应如此),我知道最新的 AIR 版本确实可以让您在操作系统中断应用程序时暂停。
如果您需要在应用程序中放置特殊逻辑来处理中断,您可以为 NativeApplication 实例编写 Event.ACTIVATE 和 Event.DEACTIVATE 的处理程序。
至于硬件的其他可访问性,则存在限制。 EG:不允许您使用细粒度的 GPS 位置,只能使用粗略的位置。如果我再次找到完整的列表,我会将其发布。
Speaking authoritatively only about the iOS packager (and by extension assuming it should be true of the apk packager) I know that recent AIR versions do indeed let you pause when the OS interrupts your application.
If you need to put special logic in your app to handle interruptions you'd write handlers for Event.ACTIVATE and Event.DEACTIVATE for the NativeApplication instance.
As for other bits of accessability to the hardware, there are limitations. EG: You aren't allowed fine-grained gps location, only coarse location. If I find the comprehensive list again I'll post it up.