{ "id": "81516", "key": "TIMOB-5749", "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": "15699", "description": "2013 Sprint 21", "name": "2013 Sprint 21", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "15701", "description": "2013 Sprint 21 Core", "name": "2013 Sprint 21 Core", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-19T01:16:53.000+0000", "created": "2011-10-13T11:37:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "androidbuild", "ay-verified", "dr-list", "geolocation" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" } ], "issuelinks": [ { "id": "31409", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "119162", "key": "TIMOB-14978", "fields": { "summary": "Android Build: Create AndroidManifest.xml", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-11-12T12:05:44.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" }, { "id": "10207", "name": "Tooling" } ], "description": "Using the code below, the appropriate entries are not added to the AndroidManifest.xml file to allow for using location services. \r\n\r\n{code:lang=javascript}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n\r\nvar locationAdded = false;\r\nvar handleLocation = function(e) {\r\n\tif (!e.error) {\r\n\t\tTi.API.info(e.coords);\r\n\t}\r\n};\r\nvar addHandler = function() {\r\n\tif (!locationAdded) {\r\n\t\tTi.Geolocation.addEventListener('location', handleLocation);\r\n\t\tlocationAdded = true;\r\n\t}\r\n};\r\nvar removeHandler = function() {\r\n\tif (locationAdded) {\r\n\t\tTi.Geolocation.removeEventListener('location', handleLocation);\r\n\t\tlocationAdded = false;\r\n\t}\r\n};\r\n\r\nTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;\r\nTi.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;\r\nif (Ti.Geolocation.locationServicesEnabled) {\r\n\taddHandler();\r\n\t\r\n\tvar activity = Ti.Android.currentActivity;\r\n\tactivity.addEventListener('destroy', removeHandler);\r\n\tactivity.addEventListener('pause', removeHandler);\r\n\tactivity.addEventListener('resume', addHandler);\r\n} else {\r\n\talert('Please enable location services');\t\r\n}\r\n{code}\r\n\r\nThe expected values of \r\n\r\n{code:lang=xml}\r\n\r\n\r\n\r\n{code}\r\n\r\nare absent from the generated AndroidManifest.xml. If you add the following line of code into the above code, the AndroidManifest.xml generates just fine.\r\n\r\n{code:lang=javascript}\r\nTi.Geolocation.getCurrentPosition(function(e) {});\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: AndroidManifest.xml not properly created when using Ti.Geolocation events", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX Lion, TiStudio 1.0.4, Android emulator 2.2 (Google APIs), Android device 2.3 (Droid X)", "comment": { "comments": [ { "id": "275796", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4781", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-19T01:16:53.000+0000", "updated": "2013-10-19T01:16:53.000+0000" }, { "id": "279124", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "The respective values are getting added in AndroidManifest.xml as\r\n\r\n\r\n\r\n\r\nVerified fixed on:\r\nAppcelerator Studio, build: 3.2.0.201311112306\r\nSDK:3.2.0.v20131111174605\r\nalloy: 1.3.0\r\nCLI : 3.2.0\r\nXcode:5.0.1\r\nDevice: Google nexus 7(v4.3)\r\nOS: Mac OSX 10.9", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-12T12:05:44.000+0000", "updated": "2013-11-12T12:05:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }