{ "id": "154720", "key": "TIMOB-20362", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-25T15:24:54.000+0000", "created": "2016-02-04T05:24:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "engSchedule" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-25T15:24:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{code:java}\r\nfunction locationListener(location) {\r\n Ti.API.info(\"Current Location: \" + JSON.stringify(location.coords));\r\n} \r\nTitanium.Geolocation.distanceFilter = 1;\r\nTitanium.Geolocation.purpose = 'Get Current Position';\r\nTitanium.Geolocation.addEventListener('location', locationListener);\r\n{code}\r\n\r\nOutput for the above code snippet shows the location as below:\r\n{code:java}\r\n{\r\n \"accuracy\": 100,\r\n \"altitude\": 0,\r\n \"altitudeAccuracy\": null,\r\n \"heading\": 0,\r\n \"latitude\": 25.1166228,\r\n \"longitude\": 55.390551,\r\n \"speed\": 0,\r\n \"timestamp\": 1454550108161\r\n}\r\n{code}\r\nIf we need the altitude value, should we add some extra parameters with it or at what conditions it can provide some value for altitude?", "attachment": [], "flagged": false, "summary": "Android: Ti.Geolocation.getCurrentPosition returns altitude=0 and altitudeAccuracy=null", "creator": { "name": "nkumar_tacme", "key": "nkumar_tacme", "displayName": "Niraj Kumar", "active": true, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "nkumar_tacme", "key": "nkumar_tacme", "displayName": "Niraj Kumar", "active": true, "timeZone": "Asia/Dubai" }, "environment": "Android", "closedSprints": [ { "id": 1169, "state": "closed", "name": "2019 Sprint 22", "startDate": "2019-10-21T15:38:21.747Z", "endDate": "2019-11-03T15:38:00.000Z", "completeDate": "2019-11-04T18:36:57.022Z", "originBoardId": 114 }, { "id": 1168, "state": "closed", "name": "2019 Sprint 21", "startDate": "2019-10-07T18:35:57.052Z", "endDate": "2019-10-20T18:35:00.000Z", "completeDate": "2019-10-21T15:38:00.182Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "376005", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe tested this issue and observed the same output for altitude and altitudeAcccuracy.\r\n\r\n*Testing Environment:*\r\nAppcelerator Studio, build: 4.4.0.201511241829\r\nAppcelerator Command-Line Interface, version 5.1.0\r\nTitanium Command-Line Interface, CLI version 5.0.5, \r\nTitanium SDK version : 5.1.2 GA\r\nMac OS X : 10.11.1 (EI Capitan)\r\nDevice: walton primo v2(android 4.2.2)\r\n\r\n*Test Output:*\r\n{code}\r\n[INFO] : geolocation result{\"timestamp\":1454576798588,\"speed\":0,\"altitude\":0,\"longitude\":90.3713633,\"latitude\":23.7920789,\"accuracy\":705,\"heading\":0,\"altitudeAccuracy\":null}\r\n{code}\r\n\r\n\r\n*Test Code:*\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\nbackgroundColor : '#fff'\r\n});\r\nwin.addEventListener('click',function(e){\r\n\tif (Ti.Geolocation.locationServicesEnabled) {\r\n\t Titanium.Geolocation.purpose = 'Get Current Location';\r\n\t Titanium.Geolocation.getCurrentPosition(function(e) {\r\n\t if (e.error) {\r\n\t Ti.API.error('Error: ' + e.error);\r\n\t } else {\r\n\t \tTi.API.info(\" geolocation result\"+ JSON.stringify(e.coords));\t \r\n\t }\r\n\t });\r\n\t} else {\r\n\t alert('Please enable location services');\r\n\t}\r\n});\r\nwin.open();\r\n{code}\r\n\r\n\r\n*Steps to test:*\r\n1. Create a classic project.\r\n2. Replace app.js with the above code\r\n3. Run the app\r\n4. Click on the window when the app opens and check the console output\r\n\r\nThanks.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-04T09:29:49.000+0000", "updated": "2016-02-10T04:11:35.000+0000" }, { "id": "376452", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~jnaher] can you test it on other devices as well?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-10T04:11:51.000+0000", "updated": "2016-02-10T04:11:51.000+0000" }, { "id": "376475", "author": { "name": "nkumar_tacme", "key": "nkumar_tacme", "displayName": "Niraj Kumar", "active": true, "timeZone": "Asia/Dubai" }, "body": "Hi,\r\n\r\nI have tested it on Samsung S5 (Android L 5.0) and Spice Uno(Android M 6.0.1) and got the same response.", "updateAuthor": { "name": "nkumar_tacme", "key": "nkumar_tacme", "displayName": "Niraj Kumar", "active": true, "timeZone": "Asia/Dubai" }, "created": "2016-02-10T06:20:35.000+0000", "updated": "2016-02-10T06:20:35.000+0000" }, { "id": "451966", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/11275", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T18:53:11.000+0000", "updated": "2019-10-10T18:53:11.000+0000" }, { "id": "452094", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "FR: Passed. PR merged.", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-16T11:10:36.000+0000", "updated": "2019-10-16T11:10:36.000+0000" }, { "id": "452265", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in SDK version {{8.3.0.v20191023125529}}.\r\n\r\nTest and other information can be found at: \r\nhttps://github.com/appcelerator/titanium_mobile/pull/11275", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-25T15:24:47.000+0000", "updated": "2019-10-25T15:24:47.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }