{ "id": "86154", "key": "TIMOB-7565", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-13T20:18:13.000+0000", "created": "2012-02-06T22:45:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_geolocation", "qe-port" ], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [ { "id": "15639", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "85651", "key": "TIMOB-7456", "fields": { "summary": "Android: Update TiLocationHelper.isValidProvider(String) since PASSIVE_PROVIDER is introduced", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15868", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "86179", "key": "TIMOB-7567", "fields": { "summary": "iOS: Implement Geolocation minispec", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15099", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "77876", "key": "TIMOB-4779", "fields": { "summary": "'location' event listener on Ti.Geolocation on Android is unreliable", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15814", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87884", "key": "TIMOB-7984", "fields": { "summary": "Android: Support setting permissions in generated permissions by module", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "16305", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "89487", "key": "TIMOB-8517", "fields": { "summary": "iOS: Add Ti.Geolocation.ACCURACY_HIGH / ACCURACY_LOW", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-22T17:02:02.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": "Refactor geolocation module on Android according to internal Geolocation additions spec: https://wiki.appcelerator.org/display/spe/Geolocation+platform+additions\r\n\r\nTest case (heavily modified KS geo test):\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'yellow'\r\n});\r\n\r\n\r\n\r\nvar providerPassive = Ti.Geolocation.Android.createLocationProvider({\r\n\tname: Ti.Geolocation.PROVIDER_PASSIVE,\r\n\tminUpdateDistance: 0.0,\r\n\tminUpdateTime: 0\r\n});\r\n\r\nvar providerNetwork = Ti.Geolocation.Android.createLocationProvider({\r\n\tname: Ti.Geolocation.PROVIDER_NETWORK,\r\n\tminUpdateDistance: 0.0,\r\n\tminUpdateTime: 5\r\n});\r\n\r\nvar providerGps = Ti.Geolocation.Android.createLocationProvider({\r\n\tname: Ti.Geolocation.PROVIDER_GPS,\r\n\tminUpdateDistance: 0.0,\r\n\tminUpdateTime: 0\r\n});\r\n\r\nvar gpsRule = Ti.Geolocation.Android.createLocationRule({\r\n\tprovider: Ti.Geolocation.PROVIDER_GPS,\r\n\tminAge: 10000\r\n});\r\n\r\n\r\n\r\nvar button1 = Ti.UI.createButton({\r\n\ttitle: 'legacy network',\r\n\ttop: 20,\r\n\tleft: 20\r\n});\r\nbutton1.addEventListener('click', function(e) {\r\n\tTi.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_NETWORK;\r\n\tTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\n\tTi.Geolocation.Android.manualMode = false;\r\n});\r\nwin.add(button1);\r\n\r\nvar button2 = Ti.UI.createButton({\r\n\ttitle: 'legacy gps',\r\n\ttop: 70,\r\n\tleft: 20\r\n});\r\nbutton2.addEventListener('click', function(e) {\r\n\tTi.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;\r\n\tTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\n\tTi.Geolocation.Android.manualMode = false;\r\n});\r\nwin.add(button2);\r\n\r\nvar button3 = Ti.UI.createButton({\r\n\ttitle: 'simple low',\r\n\ttop: 120,\r\n\tleft: 20\r\n});\r\nbutton3.addEventListener('click', function(e) {\r\n\tTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_LOW;\r\n\tTi.Geolocation.Android.manualMode = false;\r\n});\r\nwin.add(button3);\r\n\r\nvar button4 = Ti.UI.createButton({\r\n\ttitle: 'simple high',\r\n\ttop: 170,\r\n\tleft: 20\r\n});\r\nbutton4.addEventListener('click', function(e) {\r\n\tTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;\r\n\tTi.Geolocation.Android.manualMode = false;\r\n});\r\nwin.add(button4);\r\n\r\nvar button5 = Ti.UI.createButton({\r\n\ttitle: 'manual network',\r\n\ttop: 20,\r\n\tright: 20\r\n});\r\nbutton5.addEventListener('click', function(e) {\r\n\tTi.Geolocation.Android.removeLocationProvider(providerPassive);\r\n\tTi.Geolocation.Android.removeLocationProvider(providerGps);\r\n\tTi.Geolocation.Android.addLocationProvider(providerNetwork);\r\n\tTi.Geolocation.Android.manualMode = true;\r\n});\r\nwin.add(button5);\r\n\r\nvar button6 = Ti.UI.createButton({\r\n\ttitle: 'manual network+gps',\r\n\ttop: 70,\r\n\tright: 20\r\n});\r\nbutton6.addEventListener('click', function(e) {\r\n\tTi.Geolocation.Android.removeLocationProvider(providerPassive);\r\n\tTi.Geolocation.Android.addLocationProvider(providerNetwork);\r\n\tTi.Geolocation.Android.addLocationProvider(providerGps);\r\n\tTi.Geolocation.Android.manualMode = true;\r\n});\r\nwin.add(button6);\r\n\r\nvar button7 = Ti.UI.createButton({\r\n\ttitle: 'manual gps',\r\n\ttop: 120,\r\n\tright: 20\r\n});\r\nbutton7.addEventListener('click', function(e) {\r\n\tTi.Geolocation.Android.removeLocationProvider(providerPassive);\r\n\tTi.Geolocation.Android.removeLocationProvider(providerNetwork);\r\n\tTi.Geolocation.Android.addLocationProvider(providerGps);\r\n\tTi.Geolocation.Android.manualMode = true;\r\n});\r\nwin.add(button7);\r\n\r\nvar button8 = Ti.UI.createButton({\r\n\ttitle: 'gps rule on',\r\n\ttop: 170,\r\n\tright: 20\r\n});\r\nbutton8.addEventListener('click', function(e) {\r\n\tTi.Geolocation.Android.addLocationRule(gpsRule);\r\n});\r\nwin.add(button8);\r\n\r\nvar button9 = Ti.UI.createButton({\r\n\ttitle: 'gps rule off',\r\n\ttop: 170,\r\n\tright: 110\r\n});\r\nbutton9.addEventListener('click', function(e) {\r\n\tTi.Geolocation.Android.removeLocationRule(gpsRule);\r\n});\r\nwin.add(button9);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar currentLocationLabel = Titanium.UI.createLabel({\r\n\ttext:'Current Location (One Shot)',\r\n\tfont:{fontSize:12, fontWeight:'bold'},\r\n\tcolor:'#111',\r\n\ttop:260,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(currentLocationLabel);\r\n\r\nvar currentLocation = Titanium.UI.createLabel({\r\n\ttext:'Current Location not fired',\r\n\tfont:{fontSize:11},\r\n\tcolor:'#444',\r\n\ttop:280,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(currentLocation);\r\n\r\nvar updatedLocationLabel = Titanium.UI.createLabel({\r\n\ttext:'Updated Location',\r\n\tfont:{fontSize:12, fontWeight:'bold'},\r\n\tcolor:'#111',\r\n\ttop:300,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(updatedLocationLabel);\r\n\r\nvar updatedLocation = Titanium.UI.createLabel({\r\n\ttext:'Updated Location not fired',\r\n\tfont:{fontSize:11},\r\n\tcolor:'#444',\r\n\ttop:320,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(updatedLocation);\r\n\r\nvar updatedLatitude = Titanium.UI.createLabel({\r\n\ttext:'',\r\n\tfont:{fontSize:11},\r\n\tcolor:'#444',\r\n\ttop:340,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(updatedLatitude);\r\n\r\nvar updatedLocationAccuracy = Titanium.UI.createLabel({\r\n\ttext:'',\r\n\tfont:{fontSize:11},\r\n\tcolor:'#444',\r\n\ttop:360,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(updatedLocationAccuracy);\r\n\r\nvar updatedLocationTime = Titanium.UI.createLabel({\r\n\ttext:'',\r\n\tfont:{fontSize:11},\r\n\tcolor:'#444',\r\n\ttop:380,\r\n\tleft:10,\r\n\theight:15,\r\n\twidth:300\r\n});\r\nwin.add(updatedLocationTime);\r\n\r\n\r\n\r\n\r\nTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\n\r\nfunction translateErrorCode(code) {\r\n\tif (code == null) {\r\n\t\treturn null;\r\n\t}\r\n\tswitch (code) {\r\n\t\tcase Ti.Geolocation.ERROR_LOCATION_UNKNOWN:\r\n\t\t\treturn \"Location unknown\";\r\n\t\tcase Ti.Geolocation.ERROR_DENIED:\r\n\t\t\treturn \"Access denied\";\r\n\t\tcase Ti.Geolocation.ERROR_NETWORK:\r\n\t\t\treturn \"Network error\";\r\n\t\tcase Ti.Geolocation.ERROR_HEADING_FAILURE:\r\n\t\t\treturn \"Failure to detect heading\";\r\n\t\tcase Ti.Geolocation.ERROR_REGION_MONITORING_DENIED:\r\n\t\t\treturn \"Region monitoring access denied\";\r\n\t\tcase Ti.Geolocation.ERROR_REGION_MONITORING_FAILURE:\r\n\t\t\treturn \"Region monitoring access failure\";\r\n\t\tcase Ti.Geolocation.ERROR_REGION_MONITORING_DELAYED:\r\n\t\t\treturn \"Region monitoring setup delayed\";\r\n\t}\r\n}\r\n\r\nvar locationCallback = function(e) {\r\n\tif (!e.success || e.error)\r\n\t{\r\n\t\tupdatedLocation.text = 'error:' + JSON.stringify(e.error);\r\n\t\tupdatedLatitude.text = '';\r\n\t\tupdatedLocationAccuracy.text = '';\r\n\t\tupdatedLocationTime.text = '';\r\n\t\tTi.API.info(\"Code translation: \"+translateErrorCode(e.code));\r\n\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar longitude = e.coords.longitude;\r\n\tvar latitude = e.coords.latitude;\r\n\tvar altitude = e.coords.altitude;\r\n\tvar heading = e.coords.heading;\r\n\tvar accuracy = e.coords.accuracy;\r\n\tvar speed = e.coords.speed;\r\n\tvar timestamp = e.coords.timestamp;\r\n\tvar altitudeAccuracy = e.coords.altitudeAccuracy;\r\n\r\n\tupdatedLocation.text = 'long:' + longitude;\r\n\tupdatedLatitude.text = 'lat: '+ latitude;\r\n\tupdatedLocationAccuracy.text = 'accuracy:' + accuracy;\r\n\tupdatedLocationTime.text = 'timestamp:' +new Date(timestamp);\r\n\r\n\tupdatedLatitude.color = 'red';\r\n\tupdatedLocation.color = 'red';\r\n\tupdatedLocationAccuracy.color = 'red';\r\n\tupdatedLocationTime.color = 'red';\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tupdatedLatitude.color = '#444';\r\n\t\tupdatedLocation.color = '#444';\r\n\t\tupdatedLocationAccuracy.color = '#444';\r\n\t\tupdatedLocationTime.color = '#444';\r\n\t},100);\r\n\r\n\tTitanium.API.info('geo - location updated: ' + new Date(timestamp) + ' long ' + longitude + ' lat ' + latitude + ' accuracy ' + accuracy);\r\n};\r\nTitanium.Geolocation.addEventListener('location', locationCallback);\r\n\r\nwin.open();\r\n\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: refactor Geolocation module to support expanded Android functionality", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "185704", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "The test case shown in the descriptions handles switching between the various behavior modes now present in the new Geolocation module and applies a rule in one case among testing out other module level properties. \r\n\r\nTesters should first be familiar with the spec to understand what is going on in general and then perhaps change the test app to try out different combinations if desired. There are too many possible options to reasonably contain them all in a limited test app. Any questions, please contact me.", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-03-08T23:38:57.000+0000", "updated": "2012-03-08T23:38:57.000+0000" }, { "id": "185908", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "updated test case", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-03-11T14:08:53.000+0000", "updated": "2012-03-11T14:08:53.000+0000" }, { "id": "414760", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T17:02:02.000+0000", "updated": "2017-03-22T17:02:02.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }