{ "id": "107476", "key": "TIMOB-12234", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "15115", "description": "2013 Sprint 10 BB", "name": "2013 Sprint 10 BB", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-25T05:12:08.000+0000", "created": "2013-01-07T13:18:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "notable", "qe-3.3.0", "qe-closed-3.2.0", "qe-testadded" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "24735", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "89620", "key": "TIMOB-8581", "fields": { "summary": "BlackBerry: Implement Geolocation 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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "33672", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "117706", "key": "TIMOB-14690", "fields": { "summary": "BlackBerry: Implement Ti.GeoLocation.getCurrentPosition", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-05-30T17:05:12.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "h3. Acceptance Tests\r\n\r\nh4. Location event\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout: 'vertical'\r\n});\r\n\r\nif (!Ti.Geolocation.locationServicesEnabled) {\r\n\talert('Please enable location services.');\r\n}\r\n\r\nfunction onLocation(e) {\r\n coordLabels[0].text = 'lat: ' + e.coords.latitude;\r\n coordLabels[1].text = 'long: ' + e.coords.longitude;\r\n}\r\n\r\nvar geoEnabled = false;\r\nfunction toggleGeo() {\r\n\tgeoEnabled = !geoEnabled;\r\n\tgeoEnabled ? Ti.Geolocation.addEventListener('location', onLocation)\r\n\t\t : Ti.Geolocation.removeEventListener('location', onLocation);\r\n}\r\n\r\nvar toggleButton = Ti.UI.createButton({\r\n\ttitle: 'Toggle Geolocation'\r\n});\r\ntoggleButton.addEventListener('click', toggleGeo);\r\nwin.add(toggleButton);\r\n\r\nvar coordLabels = ['lat', 'long'].map(function(text) {\r\n\tvar label = Ti.UI.createLabel({\r\n\t\ttext: text,\r\n\t\twidth: Ti.UI.FILL\r\n\t});\r\n\twin.add(label);\r\n\treturn label;\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nVerify when you click the toggle button your current position is displayed and updated as you move.\r\nClicking the toggle again should turn off updates. Repeat a few times to verify it switches on/off.\r\n\r\nh4. Heading event\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar headingLabel = Ti.UI.createLabel({\r\n\ttext: 'heading = ',\r\n\twidth: Ti.UI.FILL\r\n});\r\nwin.add(headingLabel);\r\n\r\nvar accuracyLabel = Ti.UI.createLabel({\r\n\ttext: 'accuracy = ',\r\n\twidth: Ti.UI.FILL\r\n});\r\nwin.add(accuracyLabel);\r\n\r\nfunction onHeading(e) {\r\n\theadingLabel.text = 'heading = ' + e.heading.magneticHeading;\r\n\taccuracyLabel.text = 'accuracy = ' + e.heading.accuracy;\r\n}\r\n\r\nvar compassEnabled = false;\r\nfunction toggleCompass() {\r\n\tcompassEnabled = !compassEnabled;\r\n\tcompassEnabled ? Ti.Geolocation.addEventListener('heading', onHeading)\r\n\t : Ti.Geolocation.removeEventListener('heading', onHeading);\r\n}\r\n\r\nvar toggleButton = Ti.UI.createButton({\r\n\ttitle: 'Toggle Compass'\r\n});\r\ntoggleButton.addEventListener('click', toggleCompass);\r\nwin.add(toggleButton);\r\n\r\nwin.open();\r\n{code}\r\n\r\nVerify clicking the toggle button starts displaying compass heading values.\r\nTry rotating the phone to verify the degrees changes. Click the toggle again\r\nto verify the compass events stop.\r\n", "attachment": [], "flagged": false, "summary": "BlackBerry: Implement important Titanium.Geolocation functionality", "creator": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "251170", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created pull request [#36|https://github.com/appcelerator/titanium_mobile_blackberry/pull/36].", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-09T23:14:26.000+0000", "updated": "2013-05-09T23:14:26.000+0000" }, { "id": "283349", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nAppcelerator Studio, build: 3.2.0.201312081316\r\nTitanium SDK, build: 3.2.0.v20131209110113\r\nCLI 3.2.0-beta\r\nBlackBerry Z10 10.1.0.2019\r\n\r\nh5. To test\r\nadd to tiapp.xml\r\n{code}\r\n\r\n \t\r\n access_internet\r\n access_location_services\r\n\t\t\r\n \r\n{code}\r\n\r\n\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T00:34:46.000+0000", "updated": "2013-12-10T00:35:31.000+0000" }, { "id": "306349", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h5. To test\r\nRun the code below and click the toggle geolocation button \r\nhttp://pastie.org/private/vnc7cbbs0vg1ziwqdof6tq\r\n\r\nh5. Environment\r\n Appcelerator Studio, build: 3.3.0.201405161313 \r\nTitanium SDK, build: 3.3.0.v20140523120121 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-alpha4 \r\nnpm@1.3.2 \r\ntitanium@3.3.0-alpha5 \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)\r\n\r\nh5. the error\r\n{code}\r\n[ERROR] trace = TypeError: Cannot read property 'latitude' of undefined\r\n[ERROR] at [object Object].onLocation (app.js:18:45)\r\n[ERROR] line = 18\r\n{code}", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-23T22:32:42.000+0000", "updated": "2014-05-23T22:37:42.000+0000" }, { "id": "306387", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR for master: https://github.com/appcelerator/titanium_mobile_blackberry/pull/246\r\nPR for 3.3.X https://github.com/appcelerator/titanium_mobile_blackberry/pull/247", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-25T05:11:06.000+0000", "updated": "2014-05-25T05:11:06.000+0000" }, { "id": "307021", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with\r\nMac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201405271647\r\nTitanium SDK, build: 3.3.0.v20140528144113 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-beta \r\nnpm@1.3.2 \r\ntitanium@3.3.0-beta \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)\r\n\r\nVerified clicking the toggle button starts displaying compass heading values.\r\nRotated the phone to verify the degrees changes. Clicked the toggle again\r\nto verify the compass events stop.\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-30T17:05:04.000+0000", "updated": "2014-05-30T17:05:04.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }