{ "id": "123822", "key": "TIMOB-16151", "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": "15817", "description": "2014 Sprint 01", "name": "2014 Sprint 01", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15819", "description": "2014 Sprint 01 Core", "name": "2014 Sprint 01 Core", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-09T17:51:25.000+0000", "created": "2013-12-16T21:13:09.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_build", "module_media", "qe-testadded", "regression", "triage" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-02-12T07:46:27.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "h5. Expectations\r\nRequired permissions for Ti modules to be inserted into androidManifest.xml on build\r\n\r\nh5. Reality\r\nRequired permissions are NOT being inserted into androidManifest.xml on build.\r\n\r\nh5. Replicate\r\n\r\nThrow Ti.Media.vibrate into any project, build, check generated androidManifest, fail to find permission.\r\n\r\nExpect to find:\r\n{code}\r\n\r\n{code}\r\n\r\nh5. Current Workaround\r\n\r\nadd require permission manually to tiapp.xml\r\n\r\nh6. Note: this is a regression, but I'm not sure when it last worked. Not a function we use on a regular basis.\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Ti.Media.vibrate required permission not being added to androidManifest.xml ", "creator": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.9\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 24.0GB\r\n\r\nNode.js\r\n Node.js Version = 0.10.15\r\n npm Version = \r\n\r\nTitanium CLI\r\n CLI Version = 3.2.0\r\n node-appc Version = 0.2.0\r\n\r\nTitanium SDKs\r\n 3.3.0.v20131127225644\r\n\r\nJava Development Kit\r\n Version = 1.6.0_65", "comment": { "comments": [ { "id": "285547", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe tested this issue with the code bellow. We can't reproduce this problem in latest release. Please try this sample code and let us know if the issue persists. If you use a different test case, please post it here.\r\n\r\nh5. Testing Environment:\r\nAndroid SDK: 4.2.2\r\nTitanium SDK: 3.2.0.GA, 3.3.0.v20131220192449\r\nTitanium CLI Version: 3.2.0\r\n\r\nh5. Test Code\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.backgroundColor = 'white';\r\n \r\n \r\n \r\n// Create a Button.\r\nvar press = Ti.UI.createButton({\r\n\ttitle : 'press',\r\n\theight : '70',\r\n\twidth : '100',\r\n});\r\n \r\n \r\n \r\n press.addEventListener('singletap',function(e){\r\n Ti.Media.vibrate([0,500, 250, 500, 1000]);\r\n });\r\n \r\n \r\n \r\n \r\n \r\n win.add(press);\r\n// open window\r\nwin.open();\r\n{code}\r\n\r\nh5. Steps to Test:\r\n1. Create a sample project,\r\n2. Paste this code in app.js file.\r\n3. Run this with testing environment.\r\n4. Click on press button\r\n\r\n\r\nh5. Actual/expected result \r\n\r\nVibration working without modify androidManifest file \r\n\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-22T05:47:36.000+0000", "updated": "2013-12-29T19:50:39.000+0000" }, { "id": "287257", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Blah, beyond caring any more. When quality, knowledgable first tier folks start processing tickets, I might start resubmitting.\r\n\r\nhttp://stackoverflow.com/questions/13159386/android-does-notification-default-vibrate-require-vibrate-permission\r\n\r\n\r\n", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-08T20:04:29.000+0000", "updated": "2014-01-08T20:07:17.000+0000" }, { "id": "287260", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Perhaps this is a larger issue? It seems for some folks the camera permission is no longer being added automatically.\n\nhttp://developer.appcelerator.com/question/161322/timediashowcamera-fails-on-genymotion-emulator-even-though-other-camera-apps-work-fine ", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-08T20:12:45.000+0000", "updated": "2014-01-08T20:12:45.000+0000" }, { "id": "287268", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Can confirm that camera permissions are not being copied over in either.\r\n\r\nTitanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.3.0.v20140106195650\r\nCopyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.\r\n\r\n{code}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n{code}\r\n\r\nWithout the permission, showCamera error callback fires, with the permission, camera launches.\r\nThese permissions are not optional, despite what 'Rahman' seems to think.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-08T20:26:52.000+0000", "updated": "2014-01-08T20:31:55.000+0000" }, { "id": "287270", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not the same issue, but perhaps there is a related component during the manifest generation: TIMOB-16088.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-08T20:30:38.000+0000", "updated": "2014-01-08T20:30:38.000+0000" }, { "id": "287302", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I gave this a test and could not reproduce.\n\nThe only thing that could throw this off are:\n\n1) if you have a custom AndroidManifest.xml\n2) you did something like: var tim = Ti.Media; tim.vibrate();\n3) you put the Ti.Media.vibrate() call in a file that does NOT have a .js extension\n\nSo, what am I missing?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-08T22:27:31.000+0000", "updated": "2014-01-08T22:27:31.000+0000" }, { "id": "287306", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. It's an emulator only thang. Fix coming soon!", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-08T22:37:09.000+0000", "updated": "2014-01-08T22:37:09.000+0000" }, { "id": "287351", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5196\n3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5197\n\nTo test:\n1. create a project for ios and android\n2. add Ti.Media.vibrate(); to app.js\n3. run: ti build -p android --build-only\n4. look at build/android/AndroidManifest.xml and confirm it contains the android.permission.VIBRATE permission", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-09T01:23:45.000+0000", "updated": "2014-01-09T01:23:45.000+0000" }, { "id": "287374", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber] Additional comment from Stephen Feather:\n\nPermissions are not being generated for Ti proxy objects that DO require them. Additionally, in investigating the permissions issue for the end user, it appears that if an overlay is added to a camera proxy on android, the modules.titanium.media.tiCameraActivity class may not be being added to the androidManifest.xml either.\n\nPlease make sure that your fix takes care of this scenario as well.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T05:23:01.000+0000", "updated": "2014-01-09T05:23:01.000+0000" }, { "id": "287380", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Environment:\r\n\r\nAppc-Studio: 3.2.1.201401081616\r\nacs:1.0.11\r\nalloy:1.3.1-beta\r\nnpm:1.3.2\r\ntitanium:3.2.0-beta\r\ntitanium-code-processor:1.1.0\r\nOsx: Maverick 10.9\r\nXcode: xCode 5.0.2\r\nDevice: HTC Desire(v4.0.3) and IPhone4s(v7.0)\r\n\r\nUsing both sdk build 3.2.1.v20140108194846 and 3.3.0.v20140108194850\r\nTi.Media.vibrate working fine.\r\n\r\nUsed Above Test Code to test the issue.\r\nOn runtime \r\n{code}\r\n\r\n{code}\r\nRequired permission gets added in androidManifest file.\r\nIssue seems to be fixed and hence closing.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T07:17:31.000+0000", "updated": "2014-01-09T07:17:31.000+0000" }, { "id": "287426", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Priya - please read the notes more carefully when you close bugs. This was an emulator issue and should _not_ have been closed against a device.", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T17:49:01.000+0000", "updated": "2014-01-09T17:49:01.000+0000" }, { "id": "287427", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening ticket to validate against the Android emulator.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T17:51:16.000+0000", "updated": "2014-01-09T17:51:16.000+0000" }, { "id": "287604", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified the VIBRATE and CAMERA permissions are added to the build/android/AndroidManifest.xml file. \n\nAlso, verified the ti.modules.titanium.media.TiCameraActivity gets added to the build/android/AndroidManifest.xml with camera overlay and without camera overlay (e.g. calling Ti.Media.showCamera() without setting the overlay property). \n\nHere is the app.js that I used to verify:\n{code:JavaScript}\nvar window = Ti.UI.createWindow({\n\tbackgroundColor:'white',\n\tlayout:'vertical'\n});\n\nvar vibrateBtn = Ti.UI.createButton({\n\ttitle:'vibrate'\n});\n\nvar cameraBtn = Ti.UI.createButton({\n\ttitle:'camera'\n});\n\nvar cameraOverlayBtn = Ti.UI.createButton({\n\ttitle:'camera overaly'\n});\n\nvibrateBtn.addEventListener('click', function(e){\n\tTi.API.info('### vibrate');\n\tTi.Media.vibrate();\n});\n\ncameraBtn.addEventListener('click', function(e){\n\tTi.API.info('### camera');\n\t\n\tTitanium.Media.showCamera({\n\t\tsuccess:function(success_event) {\n\t\t\tTi.API.info('### camera success');\n\t\t},\n\t\t\n\t\tcancel:function(cancel_event) {\n\t\t\tTi.API.info('### camera cancel');\n\t\t},\n\t\t\n\t\terror:function(error_event) {\n\t\t\tTi.API.info('### camera error');\n\t\t}\n\t});\n});\n\ncameraOverlayBtn.addEventListener('click', function(e){\n\t// uncomment this section to verify if ti.modules.titanium.media.TiCameraActivity gets added to build/android/AndroidManifest.xml; \n\t// need to comment cameraBtn.addEventListener() section first\n\t\n\t// Ti.API.info('### camera overlay');\n// \t\n\t// var customOverlay = Ti.UI.createView();\n// \t\n\t// var takePhotoButton = Ti.UI.createButton({\n\t\t// title:'Take Photo',\n\t\t// backgroundColor : '#fff',\n // backgroundSelectedColor : '#efefef',\n // borderColor : '#000',\n // borderRadius : 17,\n // borderWidth : 1,\n // bottom : 65,\n // color : '#000',\n // height : 34,\n // opacity : 0.4,\n // width : '100dp'\n // });\n// \n // takePhotoButton.addEventListener('click', function(e) {\n // Ti.Media.takePicture();\n // });\n// \t\n\t// customOverlay.add(takePhotoButton);\n// \t\n\t// Titanium.Media.showCamera({\n\t\t// success:function(success_event) {\n\t\t\t// Ti.API.info('### camera overlay success');\n\t\t// },\n// \t\t\n\t\t// cancel:function(cancel_event) {\n\t\t\t// Ti.API.info('### camera overlay cancel');\n\t\t// },\n// \t\t\n\t\t// error:function(error_event) {\n\t\t\t// Ti.API.info('### camera overlay error');\n\t\t// },\n// \t\t\n\t\t// overlay:customOverlay\n\t// });\n});\n\nwindow.add(vibrateBtn);\nwindow.add(cameraBtn);\nwindow.add(cameraOverlayBtn);\n\nwindow.open();\n{code}\n\nTested on:\n\nAppcelerator Studio, build: 3.2.1.201401081616\nSDK build: 3.2.1.v20140109120846, 3.3.0.v20140109120852 \nCLI: 3.2.1-beta\nAlloy: 1.3.1-beta2\nDevice: Android Emulator (2.3.3), Android Emulator (4.3)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-10T06:56:55.000+0000", "updated": "2014-01-10T06:56:55.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }