[TIMOB-14560] iOS: Typo in setActivityType (GeolocationModule.m)
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-12-13T19:35:39.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 20, 2013 Sprint 20 API, Release 3.2.0 |
| Components | iOS |
| Labels | ios, qe-closed-3.2.0 |
| Reporter | Ben Bahrenburg |
| Assignee | Sabil Rahim |
| Created | 2013-07-15T03:54:34.000+0000 |
| Updated | 2013-12-17T00:08:16.000+0000 |
Description
There is a typo in setActivityType where accuracy is being set instead of activityType
PR provided https://github.com/appcelerator/titanium_mobile/pull/4454
[~ben.bahrenburg@gmail.com], [~ingo] Are there reproducible steps for this ticket?
Apologizes this was fixed as part of this PR https://github.com/appcelerator/titanium_mobile/pull/4454.
Verified fixed on: Mac OSX 10.9 Mavericks Titanium SDK, build: 3.2.0.v20131212122847 CLI: 3.2.0-cr3 GeolocationModule.m now has
instead ofClosing.Re-opening, waiting for [~srahim] test code
Closing ticket as fixed. Verified Ti.Geolocation.setActivityType is correctly setting the activityTypes. Below is the test code. Verify the last alert dialog displays something like this: "current ActivityType is :: " + Ti.Geolocation.activityType + " should be :: "+ Ti.Geolocation.ACTIVITYTYPE_FITNESS"
Tested on: Appcelerator Studio, build: 3.2.0.201312151544 SDK build: 3.2.0.v20131216064236 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr Xcode: 5.0.2 Device: iphone 4s (7.0.2), iphone 5 (6.1.3)Ti.Geolocation.purpose = "GPS demo"; var authorization = Titanium.Geolocation.locationServicesAuthorization; Ti.API.info('Authorization: '+authorization); if (authorization == Titanium.Geolocation.AUTHORIZATION_DENIED) { Ti.UI.createAlertDialog({ title:'Kitchen Sink', message:'You have disallowed Titanium from running geolocation services.' }).show(); } else if (authorization == Titanium.Geolocation.AUTHORIZATION_RESTRICTED) { Ti.UI.createAlertDialog({ title:'Kitchen Sink', message:'Your system has disallowed Titanium from running geolocation services.' }).show(); } Titanium.Geolocation.headingFilter = 90; Ti.Geolocation.getCurrentHeading(function(e) { if (e.error) { currentHeading.text = 'error: ' + e.error; Ti.API.info("Code translation: "+translateErrorCode(e.code)); return; } var x = e.heading.x; var y = e.heading.y; var z = e.heading.z; var magneticHeading = e.heading.magneticHeading; var accuracy = e.heading.accuracy; var trueHeading = e.heading.trueHeading; var timestamp = e.heading.timestamp; Titanium.API.info('geo - current heading: ' + new Date(timestamp) + ' x ' + x + ' y ' + y + ' z ' + z); }); alert("current ActivityType :: " + Ti.Geolocation.activityType); Ti.API.info("changing activityType to Ti.Geolocation.ACTIVITYTYPE_FITNESS"); Ti.Geolocation.setActivityType(Ti.Geolocation.ACTIVITYTYPE_FITNESS); alert("current ActivityType is :: " + Ti.Geolocation.activityType + " should be :: "+ Ti.Geolocation.ACTIVITYTYPE_FITNESS);