{ "id": "169820", "key": "TIMOB-25409", "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": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-03-22T21:34:18.000+0000", "created": "2017-09-18T11:54:42.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "blob", "gallery" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-23T11:28:10.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": "Test project\r\n\r\n*index.js:*\r\n{code:javascript}\r\nfunction openGallery() {\r\n Ti.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n success:function(e) {\r\n console.log(\"\\n success\");\r\n\r\n var image = Ti.UI.createImageView({\r\n image: e.media.imageAsResized(300, 150),\r\n width: \"150dp\",\r\n height: \"75dp\",\r\n top: \"10dp\"\r\n });\r\n $.win.add(image);\r\n },\r\n cancel: function() {\r\n console.log(\"cancel\");\r\n },\r\n error:function(error) {\r\n console.log(\"error\");\r\n }\r\n });\r\n}\r\n\r\nfunction onGallery() {\r\n if(!Ti.Filesystem.hasStoragePermissions()) {\r\n Ti.Filesystem.requestStoragePermissions(function(result) {\r\n if(result.success) {\r\n openGallery();\r\n }\r\n });\r\n } else {\r\n openGallery();\r\n }\r\n}\r\n\r\n$.win.open();\r\n{code}\r\n\r\n*index.xml:*\r\n{code:javascript}\r\n\r\n\t\r\n\t\t