Project: titanium
Issue TIMOB-5749: Android: AndroidManifest.xml not properly created when using Ti.Geolocation events
Using the code below, the appropriate entries are not added to the AndroidManifest.xml file to allow for using location services. {code:lang=javascript} var win = Ti.UI.createWindow(); win.open(); var locationAdded = false; var handleLocation = function(e) {	if (!e.error) {	Ti.API.info(e.coords);	} }; var addHandler = function() {	if (!locationAdded) {	Ti.Geolocation.addEventListener('location', handleLocation);	locationAdded = true;	} }; var removeHandler = function() {	if (locationAdded) {	Ti.Geolocation.removeEventListener('location', handleLocation);	locationAdded = false;	} }; Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS; if (Ti.Geolocation.locationServicesEnabled) {	addHandler();	var activity = Ti.Android.currentActivity;	activity.addEventListener('destroy', removeHandler);	activity.addEventListener('pause', removeHandler);	activity.addEventListener('resume', addHandler); } else {	alert('Please enable location services');	} {code} The expected values of {code:lang=xml} {code} are absent from the generated AndroidManifest.xml. If you add the following line of code into the above code, the AndroidManifest.xml generates just fine. {code:lang=javascript} Ti.Geolocation.getCurrentPosition(function(e) {}); {code}
Story points: 3