{ "id": "120125", "key": "TIMOB-15261", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-09-18T01:17:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:15.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Attempting to obtain a location on a Galaxy Note 2 returns a \"network unavailable\" error and no location data. The same code works on other Android devices.\r\n\r\nDrop this into a traditional project:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar updatedLongitudeLabel = Titanium.UI.createLabel({\r\n text:'Updated Location',\r\n font:{fontSize:'12dip', fontWeight:'bold'},\r\n color:'#111',\r\n top:240,\r\n left:10,\r\n height:Ti.UI.SIZE,\r\n width:300\r\n});\r\nwin.add(updatedLongitudeLabel);\r\n\r\nvar updatedLongitude = Titanium.UI.createLabel({\r\n text:'no longitude yet',\r\n font:{fontSize:'12dip'},\r\n color:'#444',\r\n top:260,\r\n left:10,\r\n height:Ti.UI.SIZE,\r\n width:300\r\n});\r\nwin.add(updatedLongitude);\r\n\r\nvar updatedLatitude = Titanium.UI.createLabel({\r\n text:'no latitude yet',\r\n font:{fontSize:'12dip'},\r\n color:'#444',\r\n top:280,\r\n left:10,\r\n height:Ti.UI.SIZE,\r\n width:300\r\n});\r\nwin.add(updatedLatitude);\r\n\r\n\r\nwin.open();\r\n\r\nTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_HIGH;\r\nvar locationAdded = false; \r\nvar locationCallback = function(e) {\r\n if (!e.success || e.error) {\r\n \t// if there's an error ...\r\n updatedLongitude.text = 'error:' + JSON.stringify(e.error);\r\n updatedLatitude.text = '';\r\n return;\r\n }\r\n\r\n var longitude = e.coords.longitude;\r\n var latitude = e.coords.latitude;\r\n\r\n updatedLongitude.text = 'long:' + longitude;\r\n updatedLatitude.text = 'lat: '+ latitude;\r\n\r\n\tlocationAdded = true;\r\n Titanium.API.info('geo - location updated: ' + new Date(timestamp) + ' long ' + longitude + ' lat ' + latitude + ' accuracy ' + accuracy);\r\n};\r\nTitanium.Geolocation.addEventListener('location', locationCallback);\r\n{code}\r\n\r\nCode here is a simplified version of the Android geolocation example at https://github.com/appcelerator-training/AndroidGeo ", "attachment": [], "flagged": false, "summary": "Android: Geolocation calls fail with \"network unavailable\" on Galaxy Note 2", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": "Ti 3.1.2GA, tested on QE's Galaxy Node 2 device, running Android 4.1.2", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }