{ "id": "152184", "key": "TIMOB-19744", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-10-29T00:46:32.000+0000", "created": "2015-10-19T21:40:10.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-5.1.0" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [ { "id": "49524", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "152452", "key": "TIMOB-19821", "fields": { "summary": "Android 6.0: Device & emulator logs don't show up in studio console", "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 } } } }, { "id": "49435", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "152309", "key": "TIMOB-19782", "fields": { "summary": "Android: eventListeners don't fire on android 6.0", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T13:59:02.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": "Steps To Reproduce:\r\n1. Use the code below in the app.js.\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n title : 'Tab 1',\r\n backgroundColor : '#fff'\r\n});\r\n\r\nvar latitude = 33.58262112511852;\r\nvar longitude = -111.71566843986511;\r\n\r\nvar locationCallback = function(e) {\r\n if(!e.success || e.error) { \r\n alert('error:' + JSON.stringify(e.error)); \r\n return; \r\n }\r\n Ti.API.info(JSON.stringify(e));\r\n\r\n var longitude = e.coords.longitude;\r\n var latitude = e.coords.latitude;\r\n\r\n};\r\nwin1.addEventListener(\"open\", function(e) {\r\n\r\n if (Ti.Geolocation.hasLocationPermissions()) {\r\n Ti.Geolocation.preferredProvider = \"gps\";\r\n Titanium.Geolocation.addEventListener('location', locationCallback);\r\n } else {\r\n Ti.Geolocation.requestLocationPermissions(function(e) {\r\n if (e.success === true) {\r\n Ti.Geolocation.preferredProvider = \"gps\";\r\n Titanium.Geolocation.addEventListener('location', locationCallback);\r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n });\r\n }\r\n});\r\n\r\nwin1.open();\r\n{code}\r\n2. Build the app on android device running android 6.0.\r\n3. After the app launches the app would ask permission to access location.\r\n4. Grant access by tapping ok\r\n5. Let the app launch & check the logs in studio console.\r\n\r\nh5.Actual Results:\r\n1. The location callback is not called & no info is seen relating to location in the console.\r\n2. Works fine with android 5.1.1, android 4.4.4.\r\n*Android 5.1.1 logs:*\r\n{code}\r\n[INFO] : {\"type\":\"location\",\"source\":{\"bubbleParent\":true,\"hasCompass\":true,\"__propertiesDefined__\":true,\"_events\":{\"location\":{}},\"preferredProvider\":\"gps\",\"lastGeolocation\":\"{\\\"latitude\\\":37.3676949,\\\"longitude\\\":-121.9137751,\\\"altitude\\\":0,\\\"accuracy\\\":67.5,\\\"heading\\\":0,\\\"speed\\\":0,\\\"timestamp\\\":1445290117314}\",\"locationServicesEnabled\":true,\"apiName\":\"Ti.Geolocation\"},\"provider\":{\"power\":1,\"name\":\"network\",\"accuracy\":2},\"coords\":{\"altitude\":0,\"speed\":0,\"longitude\":-121.9137751,\"heading\":0,\"latitude\":37.3676949,\"timestamp\":1445290117314,\"altitudeAccuracy\":null,\"accuracy\":67.5},\"bubbles\":false,\"success\":true,\"code\":0,\"cancelBubble\":false}\r\n{code}\r\n\r\nh5.Expected Results:\r\n1. The location callback should be called & location info should get printed in the console\r\n", "attachment": [], "flagged": false, "summary": "Android : Geolocation callback is not being called on android 6.0", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nAppc Studio : 4.3.3.201510172433\r\nTi SDK : 5.1.0.v20151016172827\r\nTi CLI : 5.0.5\r\nAlloy : 1.7.16\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.1-5\r\nAppc CLI : 5.1.0-38\r\nNode: v0.10.37\r\nNexus 6 - Android 6.0\r\nSamsung Galaxy S4 - Android 4.4.4", "comment": { "comments": [ { "id": "367256", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hpham] can you take a look please?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-20T05:16:37.000+0000", "updated": "2015-10-20T05:16:37.000+0000" }, { "id": "368221", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-29T00:46:23.000+0000", "updated": "2015-10-29T00:46:23.000+0000" }, { "id": "369598", "author": { "name": "adampax", "key": "adampax", "displayName": "Adam Paxton", "active": true, "timeZone": "America/New_York" }, "body": "The callback doesn't appear to be called for iOS, either. And on Android, couldn't TIMOB-19821 be worked around but just viewing LogCat? Not seeing it there, either. \r\n\r\n{noformat}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.10.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\n\r\nNode.js\r\n Node.js Version = 0.10.40\r\n npm Version = 2.14.3\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.5\r\n\r\nTitanium SDK\r\n SDK Version = 5.1.0.v20151104190037\r\n SDK Path = /Users/adam/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151104190037\r\n Target Platform = android\r\n{noformat}", "updateAuthor": { "name": "adampax", "key": "adampax", "displayName": "Adam Paxton", "active": true, "timeZone": "America/New_York" }, "created": "2015-11-10T21:00:17.000+0000", "updated": "2015-11-10T21:00:17.000+0000" }, { "id": "413663", "author": { "name": "debuisson.eugene", "key": "debuisson.eugene", "displayName": "Debuisson Eugène", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any news about that ? \r\nIt's seems that it still not working ...", "updateAuthor": { "name": "debuisson.eugene", "key": "debuisson.eugene", "displayName": "Debuisson Eugène", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T13:59:02.000+0000", "updated": "2017-03-20T13:59:02.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }