{"id":13744161,"url":"https://github.com/myflashlab/GPS-ANE","last_synced_at":"2025-05-09T02:32:45.331Z","repository":{"id":82895686,"uuid":"42718198","full_name":"myflashlab/GPS-ANE","owner":"myflashlab","description":"GPS AIR Native Extension gives you access to device's gps tool","archived":true,"fork":false,"pushed_at":"2020-08-06T11:11:57.000Z","size":47558,"stargazers_count":15,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-15T15:42:14.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myflashlab.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-18T11:39:40.000Z","updated_at":"2023-01-28T00:43:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"48c4cdad-eb8b-4fb3-9178-2bfc7e03f2cd","html_url":"https://github.com/myflashlab/GPS-ANE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGPS-ANE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGPS-ANE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGPS-ANE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGPS-ANE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myflashlab","download_url":"https://codeload.github.com/myflashlab/GPS-ANE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177845,"owners_count":21866406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:04.197Z","updated_at":"2025-05-09T02:32:44.940Z","avatar_url":"https://github.com/myflashlab.png","language":"ActionScript","funding_links":[],"categories":["Native Extension","AIR Native Extensions"],"sub_categories":["Hardware ANE"],"readme":"# GPS ANE for Android+iOS\nAlthough there is a GPS API coming with AIR SDK, in a real app development scenario, you need a better GPS solution. You need an exact and faster Gps solution which you can really trust. That's why we decided to build this cool GPS extension. it's highly optimized for automatic provider picker to ensure your app will get user location as fast as possible even if indoor. it's also optimized for battery usage so you don't have to worry about your app's battery usage at all. try the extension right now for free and see how fast it is. \n\n**Main Features:**\n* start/stop GPS service periodically\n* get one time location finder for better battery usage\n* geocoding reverse to convert gps coordinates to real addresses\n* geocoding reverse to convert gps coordinates to real addresses\n\n[find the latest **asdoc** for this ANE here.](http://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/gps/package-detail.html)\n\n# AIR Usage - location\nFor the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/GPS-ANE/blob/master/AIR/src/MainFinal.as).\n\n```actionscript\n     import com.myflashlab.air.extensions.gps.*;\n\n     /*\n        Make sure you have asked for location permission using the\n        permissionCheck ANE.\n     */\n     \n     Gps.init(); // call init only once in your project\n     \n     // will return null if no known last location has been found\n     Gps.location.getLastLocation(onLocationResult);\n     \n     // may take a while depending on when gps info is found\n     Gps.location.getCurrentLocation(onLocationResult); \n     \n     function onLocationResult($result:Location):void\n     {\n         if (!$result)\n         {\n             trace(\"location is null\");\n             return;\n         }\n         \n         trace(\"accuracy = \" + $result.accuracy);\n         trace(\"altitude = \" + $result.altitude);\n         trace(\"bearing = \" + $result.bearing);\n         trace(\"latitude = \" + $result.latitude);\n         trace(\"longitude = \" + $result.longitude);\n         trace(\"provider = \" + $result.provider);\n         trace(\"speed = \" + $result.speed);\n         trace(\"time = \" + $result.time);\n         trace(\"---------------------------------\");\n     }\n     \n     // use the start method to get gps information periodically (the gps icon will be shown at your device status bar)\n     Gps.location.addEventListener(GpsEvent.LOCATION_UPDATE, onLocationUpdate);\n     Gps.location.start(LocationAccuracy.HIGH, 0, 5000);\n     \n     // simply stop the gps service when you don't need to get location information periodically anymore.\n     Gps.location.removeEventListener(GpsEvent.LOCATION_UPDATE, onLocationUpdate);\n     Gps.location.stop();\n     \n     function onLocationUpdate(e:GpsEvent):void\n     {\n         trace(\" ------------------------------- onLocationUpdate\");\n         var loc:Location = e.param;\n         trace(\"accuracy = \" + loc.accuracy);\n         trace(\"altitude = \" + loc.altitude);\n         trace(\"bearing = \" + loc.bearing);\n         trace(\"latitude = \" + loc.latitude);\n         trace(\"longitude = \" + loc.longitude);\n         trace(\"provider = \" + loc.provider);\n         trace(\"speed = \" + loc.speed);\n         trace(\"time = \" + loc.time);\n         trace(\"---------------------------------\");\n     }\n```\n\n# AIR Usage - Geocoding\n```actionscript\n     Gps.geocoding.reverse(-33.7969235, 150.9224326, onResultGeocodingReverse);\n     \n     function onResultGeocodingReverse($address:Array):void\n     {\n         // there might be more than one address found for this location\n         trace(\"$address.length = \" + $address.length);\n         trace(\"$address = \" + JSON.stringify($address));\n         trace(\"-----------------------------\");\n     }\n     \n     Gps.geocoding.direct(\"Sydney\", onResultGeocodingDirect);\n     \n     function onResultGeocodingDirect($location:Array):void\n     {\n         // there might be more than one location found for this address\n         trace(\"$location.length = \" + $location.length);\n         trace(\"$location = \" + JSON.stringify($location));\n         trace(\"-----------------------------\");\n     }\n```\n\n# AIR .xml manifest\n```xml\n\u003c!--\nFOR ANDROID:\n--\u003e\n\u003cmanifest android:installLocation=\"auto\"\u003e\n\t\t\n\t\t\u003cuses-permission android:name=\"android.permission.WAKE_LOCK\" /\u003e\n\t\t\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\t\t\u003cuses-sdk android:targetSdkVersion=\"28\"/\u003e\n\t\t\n\t\t\u003c!-- required for GPS --\u003e\n\t\t\u003cuses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /\u003e\n\t\t\u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n\t\t\u003cuses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /\u003e\n\t\t\u003cuses-permission android:name=\"com.google.android.providers.gsf.permission.READ_GSERVICES\" /\u003e\n\t\t\u003cuses-permission android:name=\"com.google.android.gms.permission.ACTIVITY_RECOGNITION\" /\u003e\n\t\t\n\t\t\u003capplication android:hardwareAccelerated=\"true\" android:allowBackup=\"true\"\u003e\n\t\t\t\n\t\t\t\u003cactivity android:hardwareAccelerated=\"true\"\u003e\n\t\t\t\t\u003cintent-filter\u003e\n\t\t\t\t\t\u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n\t\t\t\t\t\u003ccategory android:name=\"android.intent.category.LAUNCHER\" /\u003e\n\t\t\t\t\u003c/intent-filter\u003e\n\t\t\t\t\u003cintent-filter\u003e\n\t\t\t\t\t\u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n\t\t\t\t\t\u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n\t\t\t\t\t\u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n\t\t\t\t\u003c/intent-filter\u003e\n\t\t\t\u003c/activity\u003e\n\t\t\t\n\t\t\t\u003c!-- required for GPS --\u003e\n\t\t\t\u003cservice android:name=\"io.nlopez.smartlocation.geocoding.providers.AndroidGeocodingProvider$AndroidGeocodingService\" android:exported=\"false\" /\u003e\n\t\t\t\u003cservice android:name=\"io.nlopez.smartlocation.activity.providers.ActivityGooglePlayServicesProvider$ActivityRecognitionService\" android:exported=\"false\" /\u003e\n\t\t\t\u003cservice android:name=\"io.nlopez.smartlocation.geofencing.providers.GeofencingGooglePlayServicesProvider$GeofencingService\" android:exported=\"false\" /\u003e\n\t\t\t\u003cmeta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" /\u003e\n\t\t\t\n\t\t\u003c/application\u003e\n\t\t\n\u003c/manifest\u003e\n\n\n\n\n\u003c!--\nFOR iOS:\n--\u003e\n\u003cInfoAdditions\u003e\n\t\t\u003ckey\u003eMinimumOSVersion\u003c/key\u003e\n\t\t\u003cstring\u003e10.0\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eUIStatusBarStyle\u003c/key\u003e\n\t\t\u003cstring\u003eUIStatusBarStyleBlackOpaque\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eUIRequiresPersistentWiFi\u003c/key\u003e\n\t\t\u003cstring\u003eNO\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eUIPrerenderedIcon\u003c/key\u003e\n\t\t\u003ctrue /\u003e\n\t\t\n\t\t\u003c!--required for GPS--\u003e\n\t\t\u003ckey\u003eNSLocationWhenInUseUsageDescription\u003c/key\u003e\n\t\t\u003cstring\u003eI need location reason\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eNSLocationAlwaysUsageDescription\u003c/key\u003e\n\t\t\u003cstring\u003eI need location reason\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eNSLocationAlwaysAndWhenInUseUsageDescription\u003c/key\u003e\n\t\t\u003cstring\u003eI need location reason\u003c/string\u003e\n\t\t\n\t\t\u003ckey\u003eUIDeviceFamily\u003c/key\u003e\n\t\t\u003carray\u003e\n\t\t\t\u003c!-- iPhone support --\u003e\n\t\t\t\u003cstring\u003e1\u003c/string\u003e\n\t\t\t\u003c!-- iPad support --\u003e\n\t\t\t\u003cstring\u003e2\u003c/string\u003e\n\t\t\u003c/array\u003e\n\u003c/InfoAdditions\u003e\n\t\n\t\n\t\n\t\n\u003c!--\nEmbedding the ANE:\n--\u003e\n    \u003cextensions\u003e\n\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.gps\u003c/extensionID\u003e\n\n        \u003c!-- Required for gps ANE to work --\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.permissionCheck\u003c/extensionID\u003e\n\t\n\t    \u003c!-- Dependency ANEs https://github.com/myflashlab/common-dependencies-ANE --\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.androidx.core\u003c/extensionID\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.androidx.lifecycle\u003c/extensionID\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.overrideAir\u003c/extensionID\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.googlePlayServices.base\u003c/extensionID\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.googlePlayServices.basement\u003c/extensionID\u003e\n        \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.googlePlayServices.location\u003c/extensionID\u003e\n\n    \u003c/extensions\u003e\n--\u003e\n```\n\n# Requirements\n* Android API 19+\n* iOS SDK 10.0+\n* AIR SDK 33+\n\n# Permissions\nBelow are the list of Permissions this ANE might require. Check out the demo project available at this repository to see how we have used the [PermissionCheck ANE](http://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extension/) to ask for the permissions.\n\nNecessary | Optional\n--------------------------- | ---------------------------\n[SOURCE_LOCATION](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_LOCATION) for Android | [SOURCE_LOCATION_ALWAYS](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_LOCATION_ALWAYS) for iOS  \n[SOURCE_LOCATION_WHEN_IN_USE](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_LOCATION_WHEN_IN_USE) for iOS | -\n\n# Commercial Version\nhttps://www.myflashlabs.com/product/gps-ane-adobe-air-native-extension/\n\n[![GPS ANE](https://www.myflashlabs.com/wp-content/uploads/2015/11/product_adobe-air-ane-extension-gps-2018-595x738.jpg)](https://www.myflashlabs.com/product/gps-ane-adobe-air-native-extension/)\n\n# Tutorials\n[How to embed ANEs into **FlashBuilder**, **FlashCC** and **FlashDevelop**](https://www.youtube.com/watch?v=Oubsb_3F3ec\u0026list=PL_mmSjScdnxnSDTMYb1iDX4LemhIJrt1O)  \n\n# Premium Support #\n[![Premium Support package](https://www.myflashlabs.com/wp-content/uploads/2016/06/professional-support.jpg)](https://www.myflashlabs.com/product/myflashlabs-support/)\nIf you are an [active MyFlashLabs club member](https://www.myflashlabs.com/product/myflashlabs-club-membership/), you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the [premium support package](https://www.myflashlabs.com/product/myflashlabs-support/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FGPS-ANE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyflashlab%2FGPS-ANE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FGPS-ANE/lists"}