{ "id": "98649", "key": "TIMOB-10309", "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": "13870", "description": "", "name": "Sprint 2012-16 API", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-14T18:23:04.000+0000", "created": "2012-08-03T11:55:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_geolocation", "parity", "qe-manualtest" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-14T18:23:04.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": "h3. Issue\r\n\r\nWhen an address is passed into Ti.Geolocation.forwardGeocoder() the callback function is not called and it gets stuck in an infinite loop. It should behave just like it does on iOS where the callback is called upon success/failure. The sample code is attached. On iOS we receive both alerts that the callback was successful and the finished alert. On Android we do not see the alert that the callback was successful just that we started the fowardGeocoder().\r\n\r\nh3. Sample Code\r\n\r\n{noformat}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n//create object instance, a parasitic subclass of Observable\r\nvar self = Ti.UI.createView();\r\nwin.add(self);\r\n\r\nwin.open();\r\n\r\nvar addr = '94302';\r\n\r\nsetTimeout(function() {\r\n alert('Start forwardGeocoder for: ' + addr);\r\n try {\r\n Ti.Geolocation.forwardGeocoder(addr, function(evt) {\r\n alert('Foward Geocoder Callback for 94302 Successful');\r\n });\r\n } catch(err) {\r\n alert(\"Error\");\r\n }\r\n\r\n}, 2000);\r\n\r\nsetTimeout(function() {\r\n addr = 'hhhhhhgggggg';\r\n alert('Start forwardGeocoder for: ' + addr);\r\n try {\r\n Ti.Geolocation.forwardGeocoder(addr, function(evt) {\r\n alert('Foward Geocoder Callback for ' + addr + ' Successful');\r\n setTimeout(function() {\r\n alert('finished');\r\n }, 2000);\r\n });\r\n } catch(err) {\r\n alert(\"Error 2\");\r\n }\r\n\r\n}, 8000); \r\n{noformat}", "attachment": [], "flagged": false, "summary": "Android: Ti.Geolocation.forwardGeocoder() callback is not called for a bad address", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 2.1.1\r\nPlatform OS: Android 2.3", "comment": { "comments": [ { "id": "213472", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/2700", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-08T17:12:29.000+0000", "updated": "2012-08-08T17:12:29.000+0000" }, { "id": "213637", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Steps for functional test:\r\n1. Run the test case in the ticket description on Android. Should see 5 alert dialogs. (before the fix, can only see 2 alert dialogs).\r\n2. Run the test case below on both Android and iOS to see the parity.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n//create object instance, a parasitic subclass of Observable\r\nvar self = Ti.UI.createView();\r\nwin.add(self);\r\n \r\nwin.open();\r\n \r\nvar addr = 'san jose';\r\n \r\nsetTimeout(function() {\r\n alert('Start forwardGeocoder for: ' + addr);\r\n try {\r\n Ti.Geolocation.forwardGeocoder(addr, function(evt) {\r\n \tvar message = 'Foward Geocoder for ' + addr + ': evt.success = ' + evt.success + ', evt.error = ' + evt.error;\r\n alert(message);\r\n });\r\n } catch(err) {\r\n alert(\"Error\");\r\n }\r\n \r\n}, 2000);\r\n \r\nsetTimeout(function() {\r\n addr = 'hhhhhhgggggg';\r\n alert('Start forwardGeocoder for: ' + addr);\r\n try {\r\n Ti.Geolocation.forwardGeocoder(addr, function(evt) {\r\n var message = 'Foward Geocoder for ' + addr + ': evt.success = ' + evt.success + ', evt.error = ' + evt.error;\r\n alert(message);\r\n setTimeout(function() {\r\n alert('finished');\r\n }, 2000);\r\n });\r\n } catch(err) {\r\n alert(\"Error 2\");\r\n }\r\n \r\n}, 8000); \r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-09T13:38:55.000+0000", "updated": "2012-08-09T13:38:55.000+0000" }, { "id": "214475", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to add fixversion `Release 2.1.2`", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T16:06:12.000+0000", "updated": "2012-08-14T16:06:12.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }