{ "id": "167797", "key": "TIMOB-24707", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-10T18:44:05.000+0000", "created": "2017-05-18T15:51:38.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "gallery", "video" ], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "56218", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "170628", "key": "AC-5454", "fields": { "summary": "Android: openPhotoGallery is not working on SDK 6.3.0.GA", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-07-02T22:00:54.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": "Hello,\r\n\r\nWe have tried to open the videos from Android gallery but its not opening.\r\n\r\n*Testing Environment:*\r\nTitanium SDK: 6.0.4.GA\r\nAppcelerator Command-Line Interface, version 6.2.0\r\nAndroid device: Samsung Galaxy Grand Prime(5.1.1)\r\n\r\n*Test Code:*\r\n{code}\r\n\r\nvar storagePermission = \"android.permission.READ_EXTERNAL_STORAGE\";\r\n\r\nvar hasStoragePermission = Ti.Android.hasPermission(storagePermission);\r\n\r\nvar permissionsToRequest = [];\r\n\r\nvar win = Ti.UI.createWindow({\r\n\r\n title : 'mywin',\r\n\r\n backgroundColor : '#fff',\r\n\r\n width : Ti.UI.FILL,\r\n\r\n height : Ti.UI.FILL\r\n\r\n});\r\n\r\nwin.open();\r\n\r\nif (!hasStoragePermission) {\r\n\r\n permissionsToRequest.push(storagePermission);\r\n\r\n}\r\n\r\nif (permissionsToRequest.length > 0) {\r\n\r\n Ti.Android.requestPermissions(permissionsToRequest, function(e) {\r\n\r\n if (e.success) {\r\n\r\n Ti.API.info(\"SUCCESS\");\r\n\r\n } else {\r\n\r\n Ti.API.info(\"ERROR: \" + e.error);\r\n\r\n }\r\n\r\n });\r\n\r\n}\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n\r\n title : 'Click',\r\n\r\n top : 60\r\n\r\n});\r\n\r\nwin.add(btn1);\r\n\r\n\r\nbtn1.addEventListener('click', function() {\r\n\r\nTi.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],\r\n success: function (e) {\r\n Ti.API.info(\"Success\");\r\n },\r\n cancel: function () {\r\n },\r\n error: function (e) {\r\n Ti.API.error(JSON.stringify(e));\r\n }\r\n});\r\n\r\n}); {code}\r\n\r\nTiapp.xml\r\n{code}\r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n{code}\r\n\r\n\r\n*Test Result:*\r\nJust Opening the Photos from gallery but videos are not Opening.\r\n\r\n*Expected Result:*\r\nOpen the videos also from Android App Gallery.\r\n\r\nPhoto gallery API shows videos too for iOS. Am I missing something or this is not available for Android? If not available for Android, Can we consider it for improvement? ", "attachment": [], "flagged": false, "summary": "Android: Add video support to Ti.Media.openPhotoGallery()", "creator": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "419955", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "This is a valid query for Android. Moving to Engineering. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-05-18T17:07:18.000+0000", "updated": "2017-05-18T17:07:18.000+0000" }, { "id": "424246", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9223", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-17T23:48:32.000+0000", "updated": "2017-07-17T23:48:32.000+0000" }, { "id": "431820", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Frankie's PR has been updated. Pending final review.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-07T02:50:18.000+0000", "updated": "2017-12-07T02:50:18.000+0000" }, { "id": "434282", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jquick] Just to be sure: AC-5581 is something else right?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-09T06:54:14.000+0000", "updated": "2018-02-09T06:54:14.000+0000" }, { "id": "434308", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], my updated PR for this case fixes the blob/file handling for videos too, allowing it to be played via a VideoPlayer. So, it should theoretically upload the video file now **BUT** our HTTPClient API is currently coded to write a blob to file before uploading it, which we don't want to do since videos tend to be huge.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L904\r\n\r\nWe might not have enough storage space and it'll cause a significant delay before starting the upload (must wait until it finishes writing to storage). It should probably be optimized to stream the bytes from blob instead.\r\n\r\n*Edit:*\r\nActually, it sounds like [AC-5581] is a really a WebView issue where the JavaScript is unable to show a video selection dialog?", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-09T19:59:54.000+0000", "updated": "2018-02-09T20:02:10.000+0000" }, { "id": "434495", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bumping from 7.1.0, we need to cleanup this PR and fix conflicts.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-14T23:03:48.000+0000", "updated": "2018-02-14T23:03:48.000+0000" }, { "id": "437534", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-09T20:47:53.000+0000", "updated": "2018-05-09T20:47:53.000+0000" }, { "id": "437567", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.\r\n\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T18:43:58.000+0000", "updated": "2018-05-10T18:43:58.000+0000" }, { "id": "438944", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK7.3.0.v20180628132121.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-02T22:00:50.000+0000", "updated": "2018-07-02T22:00:50.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }