{ "id": "90284", "key": "TIMOB-8751", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13405", "description": "Sprint 2012-09 API", "name": "Sprint 2012-09 API", "archived": true, "released": true, "releaseDate": "2012-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-10T00:08:52.000+0000", "created": "2012-04-16T18:10:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_geolocation", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "16877", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "85026", "key": "TIMOB-7249", "fields": { "summary": "Android: Intent - getData(), getAction(), and getType() do not work", "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 } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-10T16:21:55.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": "h4. Problem description\r\nIf you call Titanium.Geolocation.getPreferredProvider() and the Geo services are not enabled, the app will crash.\r\n\r\nh4. Actual results\r\nThe app crashes\r\n\r\nh4. Expected results\r\nIF there is no geo services enabled, just warn the user. \r\n\r\nh4. Test Case.\r\n1. Create a new mobile project.\r\n2. Paste this code:\r\n{code}\r\n\tTi.API.info(Titanium.Geolocation.getPreferredProvider());\r\n{code}\r\n3. Disable Geolocation services in the device.\r\n4. Build for device.\r\n5. Run the app\r\n\r\nh4. HD Discussion\r\nhttp://support-admin.appcelerator.com/display/APP-423883\r\n\r\nh4. Workaround\r\n\r\n{code}\r\nif(Titanium.Geolocation.getLocationServicesEnabled()){\r\n\tTi.API.info(Titanium.Geolocation.getPreferredProvider());\r\n} else {\r\n\talert('Geo Services not enabled');\r\n\tTi.API.info(\"Geo Services not enabled\");\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Ti.Geolocation.getPreferredProvider() crashes the app when location services are disabled", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 1.8.2\r\nJavascript Engine: V8 \r\nPlatform & version: Android 2.3, 3.1 \r\nDevice Details: Android emulator and Acer Iconia A500 \r\nHost Operating System: OS X 10.7.3 \r\nTitanium Studio version: 1.0.9", "comment": { "comments": [ { "id": "192881", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note [preferredProvider|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.Geolocation-property-preferredProvider] has been deprecated. The [accuracy|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.Geolocation-property-accuracy] property is the new method for \"simple mode\".", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T20:30:57.000+0000", "updated": "2012-04-26T20:30:57.000+0000" }, { "id": "192882", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue since there is a work around and the property is deprecated and will be removed.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T20:32:35.000+0000", "updated": "2012-04-26T20:32:35.000+0000" }, { "id": "192964", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[PR #2088|https://github.com/appcelerator/titanium_mobile/pull/2088] fixes a crash/JS error seen when trying to call getPreferredProvider().\r\n\r\nNo longer see any application crashes after applying the fix.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-27T11:05:58.000+0000", "updated": "2012-04-27T11:05:58.000+0000" }, { "id": "199957", "author": { "name": "psingh", "key": "psingh", "displayName": "Payminder Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Titanium Studio: 2.1.0.201206221045\r\nMobile SDK: 2.1.0.v20120622174154\r\nOS: X Lion\r\nDevice: Samsung Galaxy \r\n\r\nFixed.\r\n\r\nApp doesn't crash, nor does it provide any string information about geo location or warning message, either with Geo-location setting is enable or disable from device settings. Returned undefined", "updateAuthor": { "name": "psingh", "key": "psingh", "displayName": "Payminder Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:59:52.000+0000", "updated": "2012-06-23T15:59:52.000+0000" }, { "id": "202285", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit label", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-10T00:08:15.000+0000", "updated": "2012-07-10T00:08:15.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }