{ "id": "125430", "key": "AC-1753", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-01-31T17:25:05.000+0000", "created": "2014-01-26T20:26:39.000+0000", "labels": [ "alloy", "android-4.2.2", "geolocation" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:38.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "First, this app works as intended on iOS simulator and iPhone 5. \r\n\r\nI launch the app, navigate to my TableView, and select a row which fires the breakpoint at the custom event. Stepping through the code on my android device, \r\nI call my geoLocation event {code}Ti.API.fireEvent('getCurrentPosition');{code}\r\nwhich fires\r\n{code}\r\nTi.App.addEventListener('getCurrentPosition', function() {\r\n\tTi.Geolocation.getCurrentPosition(updateGeolocation);\r\n});\r\n{code}\r\nwhich in turn calls\r\n{code}\r\nfunction updateGeolocation(e) {\r\n\r\n\tTi.App.Properties.setDouble('geo.lat', e.coords.latitude);\r\n\tTi.App.Properties.setDouble('geo.lon', e.coords.longitude);\r\n\r\n\treturn;\r\n}\r\n{code}. Upon reaching updateGeoLocation(), the app crashes with an error(see screenshot) with the console output noted in the attached text file. Something is definitely wrong with the geo-location piece because if I comment it out, I can navigate to the row's child record. I tried getting assistance on the forum, but never got any response whatsoever. Finally, when the app launches, it performs a geo-permission test like this:\r\n{code}\r\nfunction checkGeoPermission() {\r\n\tif (Ti.Geolocation.locationServicesEnabled === false) {\r\n\t\thelper.showDialog({\r\n\t\t\ttitle : 'Mapping Error',\r\n\t\t\tmessage : 'Your device has geo turned off - turn it on.'\r\n\t\t});\r\n\t} else {\r\n\t\tif (OS_IOS) {\r\n\t\t\tvar authorization = Ti.Geolocation.getLocationServicesAuthorization();\r\n\t\t\tif (authorization == Ti.Geolocation.AUTHORIZATION_DENIED) {\r\n\t\t\t\thelper.showDialog({\r\n\t\t\t\t\ttitle : 'Mapping Error',\r\n\t\t\t\t\tmessage : 'You have disallowed App from running geolocation services.'\r\n\t\t\t\t});\r\n\t\t\t} else if (authorization == Ti.Geolocation.AUTHORIZATION_RESTRICTED) {\r\n\t\t\t\thelper.showDialog({\r\n\t\t\t\t\ttitle : 'Mapping Error',\r\n\t\t\t\t\tmessage : 'Your system has disallowed App from running geolocation services.'\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn;\r\n};\r\n{code}\r\nI think this may be a bug with how android handles location services. If I can get help resolving it, I would be most grateful.\r\n\r\nRegards,\r\nMike.", "attachment": [ { "id": "45390", "filename": "foodtruck-console.txt", "author": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-26T20:26:39.000+0000", "size": 25137, "mimeType": "text/plain" }, { "id": "45391", "filename": "Screenshot_2014-01-26-13-33-43.png", "author": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-26T20:26:39.000+0000", "size": 68349, "mimeType": "image/png" } ], "flagged": false, "summary": "App crashes on Android when firing synthetic geo-location event", "creator": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "environment": "* app: android mobile\r\n* sdk 3.1.3.GA\r\n* os: osx mavericks\r\n* studio Titanium Studio, build: 3.1.3.201309132423\r\n* ACS foodtruck app\r\n* output: Samsung Galaxy Tab3, api 4.2.2 \r\n", "comment": { "comments": [ { "id": "289767", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I noticed that you are checking Geo permission for iOS platform but not for Android platform. Can you check for permissions on Android platform in checkGeoPermission function as well? It may also be related to not having the correct geo entry in the manifest file. Please provide a simple but complete test case to reproduce this issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T06:45:21.000+0000", "updated": "2014-01-27T06:45:21.000+0000" }, { "id": "290063", "author": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "body": "Ritu,\nI wasn't able to find any specific Android related location services permission checks in the api. The Ti.Geolocation.Android doc states, \n\n{quote}Manual configuration is recommended for applications that have more demanding geolocation needs (for example, driving directions). However, for basic geolocation information, *simple mode* geolocation may be sufficient.{quote}\n\nI am using simple mode, so the only check I do for android is in my init() method,\n{code}\tif (OS_ANDROID) {\n\t\tTitanium.Geolocation.Android.LocationProvider = Ti.Geolocation.PROVIDER_GPS;\n\t\tTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;\n\t}\n{code}\nIf you know of something else in the api that I haven't found, please let me know. As for a test case, I gave you what I have. The app's table view links to an ACS table for which you don't have access, so that won't help you at all. How else can I help move this forward?", "updateAuthor": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-28T20:33:50.000+0000", "updated": "2014-01-28T20:33:50.000+0000" }, { "id": "290178", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the update. We need a complete runnable test case that we can run as it is to reproduce exactly the same issue you are running into. You don't need to provide us access to ACS table as you should be able to reproduce this issue without ACS by putting some dummy values in the table view.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-29T06:20:13.000+0000", "updated": "2014-01-29T06:20:13.000+0000" }, { "id": "290627", "author": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "body": "Ritu,\nPlease close. It must not be a bug, because I cannot replicate the error with a test case. Sorry to waste your time.\n\nRegards.", "updateAuthor": { "name": "madcode", "key": "madcode", "displayName": "Michael Stelly", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-31T16:57:48.000+0000", "updated": "2014-01-31T16:57:48.000+0000" }, { "id": "290632", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No problem [~madcode]. ", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-31T17:24:52.000+0000", "updated": "2014-01-31T17:24:52.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }