{"id":18825544,"url":"https://github.com/outsystems/cordova-plugin-cache-coordinates","last_synced_at":"2025-06-18T15:41:11.715Z","repository":{"id":70207341,"uuid":"48751591","full_name":"OutSystems/Cordova-Plugin-Cache-Coordinates","owner":"OutSystems","description":"Cache Coordinates Cordova plugin","archived":false,"fork":false,"pushed_at":"2015-12-29T15:55:54.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-12-30T04:58:45.437Z","etag":null,"topics":["engineering","odc","snyk-mobile","ssdlc-rules"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-29T14:39:39.000Z","updated_at":"2024-03-05T10:14:27.000Z","dependencies_parsed_at":"2023-03-01T00:46:11.613Z","dependency_job_id":null,"html_url":"https://github.com/OutSystems/Cordova-Plugin-Cache-Coordinates","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/OutSystems%2FCordova-Plugin-Cache-Coordinates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FCordova-Plugin-Cache-Coordinates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FCordova-Plugin-Cache-Coordinates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FCordova-Plugin-Cache-Coordinates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutSystems","download_url":"https://codeload.github.com/OutSystems/Cordova-Plugin-Cache-Coordinates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763668,"owners_count":19692800,"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":["engineering","odc","snyk-mobile","ssdlc-rules"],"created_at":"2024-11-08T00:59:57.044Z","updated_at":"2025-02-20T01:45:34.528Z","avatar_url":"https://github.com/OutSystems.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cordova Cache Coordinates Plugin\n\nThis plugin allows you to get coordinates and store them to return quickly one result when there is a request. The main goal with this plugin is for the situations that the device can lose the GPS signal and for this case return the last coordinates captured.\n\nAlthough in the global scope, they are not available until after the `deviceready` event.\n\n    document.addEventListener(\"deviceready\", onDeviceReady, false);\n    function onDeviceReady() {\n        console.log(FileTransfer);\n    }\n\n## Installation\n\n    cordova plugin add https://github.com/OutSystems/Cordova-Plugin-Cache-Coordinates.git\n\n## Supported Platforms\n\n- Android\n\n\n# CacheCoordinates\n\nThe `CacheCoordinates` object provides a way to init the tracker to get the coordinates, get coordinates and stop the tracker.\n\n## Methods\n\n- __init__: Start tracker the coordinates.\n\n- __getCoordinates__: Return the last coordinates.\n\n- __stop__: Stop tracker to get Coordinates.\n\n\n## init\n\n__Parameters__:\n\n- __timeBetweenUpdates__: The minimum time interval between location updates, in milliseconds.\n\n- __metersBetweenUpdates__: The minimum distance between location updates in meters.\n\n- __successCallback__: A callback that is passed a `CacheCoordinates` object. _(Function)_\n\n- __errorCallback__: A callback that executes if an error occurs retrieving the `CacheCoordinates` object. _(Function)_\n\n### Example\n    var success = function (r) {\n        console.log(\"Response = \" + r);\n    }\n\n    var fail = function (error) {\n        console.log(\"init error \" + error);\n    }\n    \n    var timeBetweenUpdates = 120000; // 2min\n    var metersBetweenUpdates = 100;\n    \n    cordova.plugins.cacheCoordinates.init(success, fail, timeBetweenUpdates, metersBetweenUpdates);\n\n\n## getCoordinates\n\n__Parameters__:\n\n- __successCallback__: A callback that is passed a `CacheCoordinates` object. _(Function)_\n\n- __errorCallback__: A callback that executes if an error occurs retrieving the `CacheCoordinates` object. _(Function)_\n\n### Example\n\n    var success = function (r) {\n        console.log(\"Response = \" + r);\n    }\n\n    var fail = function (error) {\n        console.log(\"coordinates error \" + error);\n    }\n    \n    cordova.plugins.cacheCoordinates.getCoordinates(success, fail);\n\n    Sample Response: \n    \"{\n        timestamp: \"2015-08-04 08:04:03.759\", \n        longitude: \"-19.5333\", \n        latitude: \"45.96670000000001\"\n    }\"\n\n## stop\n\n__Parameters__:\n\n- __successCallback__: A callback that is passed a `CacheCoordinates` object. _(Function)_\n\n- __errorCallback__: A callback that executes if an error occurs retrieving the `CacheCoordinates` object. _(Function)_\n\n### Example\n\n    var success = function (r) {\n        console.log(\"Response = \" + r);\n    }\n\n    var fail = function (error) {\n        console.log(\"init error \" + error);\n    }\n\n    cordova.plugins.cacheCoordinates.stop(success, fail)\n        \n\n---\n#### Contributors\n- OutSystems - Mobility Experts\n    - João Gonçalves, \u003cjoao.goncalves@outsystems.com\u003e\n    - Rúben Gonçalves, \u003cruben.goncalves@outsystems.com\u003e\n    - Vitor Oliveira, \u003cvitor.oliveira@outsystems.com\u003e\n\n#### Document author\n- Vitor Oliveira, \u003cvitor.oliveira@outsystems.com\u003e\n\n###Copyright OutSystems, 2015\n\n---\n\nLICENSE\n=======\n\n\n[The MIT License (MIT)](http://www.opensource.org/licenses/mit-license.html)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fcordova-plugin-cache-coordinates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutsystems%2Fcordova-plugin-cache-coordinates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fcordova-plugin-cache-coordinates/lists"}