守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1111|回复: 0

Android GPS扩展

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    52623
    钢镚
    1422

    开源英雄守望者

    发表于 2015-2-2 17:18:59 | 显示全部楼层 |阅读模式
    应用下载
    应用名称: GeoCapabilitiesANE
    支持64位:
    当前版本: 未知
    运行平台: Android 
    开发语言: ActionScript 3 JAVA 
    应用类别: ANE-JAVA
    应用简介: Android ANE for detecting if GPS is actually on or not
    GeoCapabilities ANE

    GeoCapabilities is an AIR Native Extension designed to expose more granular information on whether GPS is enabled or disabled. Geolocation API only tells if access has been denied to location information. GeoCapabilities tells whether GPS is turned on or not, or if Network-based location has been denied. Note: putting your phone in Airplane Mode does NOT disabled network location detection as far as the Android LocationManager API is concerned. It only tells if location data via wi-fi or network has been disabled in Settings > Location.

    It allows you to listen for status events from location providers, tell how long it took to get the first GPS fix, and also to use the addProximityAlert method of the Android API to listen for an event when you are within a certain radius of a given point.

    This extension is Android only (with very limited desktop simulator support). There is no intention of supporting iOS.

    Notes

    GPS status events are dispatched only after an application attempts to use the GPS. GPS status events can also be dispatched when Network location providers (wi-fi & towers) are disabled or enabled Network status events will only be dispatched after calling startNetworkProviderMonitoring. Once you don't need it, make sure to call stopNetworkProviderMonitoring to prevent unnecessary battery drain Toggling location access for the Network is very noisy. Several events are dispatched while the user approves access. The last one is what matters.

    Projects
    • GeoCapabilitiesLib Flex Library project that contains the AS3 API for the ANE.
    • GeoCapabilitiesDefault Flex Library project. Default implementation of API that should allow this ANE to work on desktop simulators. Should, but might not at the moment
    • GeoCapabilitiesANE Android project in Java used to generate the jar for the ANE
    • GeoCapabilitiesTest Flex Project. Sample implementation project.
    • GeoCapabilitiesTestAndroid Android Project in Java used for debugging the Java side of things. In Devices panel in Eclipse, after running AIR app in debug, select the app identifier and click the green debug icon to enable breakpoints.
    Build the ANE

    To build the ANE, 1. go to the build directory in console 2. put in the following command: adt -package -target ane GeoCapabilities.ane extension.xml -swc GeoCapabilitiesLib.swc -platform Android-ARM -C android . -platform default -C default . 3. copy the GeoCapabilities.ane into the libs folder of GeoCapabilitiesTest

    This assumes you have adt installed. If you don't, follow the instructions in this tutorial, which is how I got my start: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html Part 5 of that article tells how to structure your build files for the ANE.

    License

    GeoCapabilities is freely distributable under the terms of the MIT license.






    相关链接:


    https://github.com/turbidwater/GeoCapabilitiesANE

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2024-3-29 19:45 , Processed in 0.048625 second(s), 38 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表