{ "id": "166221", "key": "AC-4816", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-02-23T15:44:56.000+0000", "created": "2017-02-22T12:08:24.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-02-27T19:12:01.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "On android when I try to pick an image from downloads folder using openPhotoGallery I get an error when I try to access the blob object's functions and properties like blob.length or blob.imageAsResized\r\n", "attachment": [ { "id": "61668", "filename": "app.js", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-02-23T13:42:39.000+0000", "size": 1194, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Native error on Android when I pick image from Downloads using openPhotoGallery", "creator": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "environment": "Titanium SDK v 6.0.1.GA\r\nMac OSX El Capitan\r\nDevices reproduced:\r\n- Samsung Galaxy J7 Android v 6.0\r\n- Huawei Nexus 6P Android v 7.1.1\r\n", "comment": { "comments": [ { "id": "407579", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a sample code that demonstrate the issue. Please create a sample app.js code that we can test to validate the bug. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-22T15:30:15.000+0000", "updated": "2017-02-22T15:31:10.000+0000" }, { "id": "407731", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "When I run this project and pick an image from the downloads folder I get the following error:\r\nERROR] : TiExceptionHandler: (main) [3213,3213] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,3213] - In undefined:33,23\r\n[ERROR] : TiExceptionHandler: (main) [0,3213] - Message: Uncaught Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference\r\n[ERROR] : TiExceptionHandler: (main) [0,3213] - Source: \t\t\t\t\tTi.API.info(JSON.stringify(event));\r\n\r\n\r\ncode attached", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-02-23T13:41:11.000+0000", "updated": "2017-02-23T13:43:08.000+0000" }, { "id": "407743", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, According to the error you should remove below line from success. The rest is fine. Thanks.\r\n{code}\r\n Ti.API.info(JSON.stringify(event));\r\n{code}\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-23T15:44:17.000+0000", "updated": "2017-02-23T15:44:39.000+0000" }, { "id": "407744", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "That was not helpful, can you please reopen it and assign it to someone to look at it ?", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-02-23T15:50:39.000+0000", "updated": "2017-02-23T15:50:39.000+0000" }, { "id": "407756", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I can test the sample code with commenting the above line and everything is fine.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title : 'Pick',\r\n top : 50,\r\n height : Ti.UI.SIZE,\r\n width : Ti.UI.SIZE\r\n});\r\n\r\nvar imageView = Ti.UI.createImageView({\r\n height : 500,\r\n width : 500,\r\n top : 300\r\n});\r\nwin.add(imageView);\r\n\r\nvar ensureStoragePermissions = function(cb) {\r\n if (Ti.Filesystem.hasStoragePermissions() && cb)\r\n cb();\r\n else {\r\n Ti.Filesystem.requestStoragePermissions(function(e) {\r\n if (e.success && cb)\r\n cb();\r\n });\r\n }\r\n\r\n};\r\n\r\nbtn.addEventListener('click', function() {\r\n ensureStoragePermissions(function() {\r\n Titanium.Media.openPhotoGallery({\r\n success : function(event) {\r\n // called when media returned from the camera\r\n Ti.API.debug('Our type was: ' + event.mediaType);\r\n if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n //Ti.API.info(JSON.stringify(event));\r\n imageView.image = event.media;\r\n } else {\r\n alert(\"got the wrong type back =\" + event.mediaType);\r\n }\r\n },\r\n cancel : function() {\r\n // called when user cancels taking a picture\r\n },\r\n error : function(error) {\r\n // called when there's an error\r\n\r\n },\r\n saveToPhotoGallery : true,\r\n // allowEditing and mediaTypes are iOS-only settings\r\n allowEditing : true,\r\n mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n\r\n });\r\n});\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\nTest the code.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-23T17:50:39.000+0000", "updated": "2017-02-23T17:50:39.000+0000" }, { "id": "407764", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "Please try outputting the blob's size / height / width or call imageAsResized on an image picked from the downloads folder", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-02-23T18:11:54.000+0000", "updated": "2017-02-23T18:11:54.000+0000" }, { "id": "407978", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After testing with the test code i am unable to reproduce ", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-24T19:01:43.000+0000", "updated": "2017-02-24T19:01:43.000+0000" }, { "id": "407985", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "What SDK / Android version did you try ?", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-02-24T19:38:12.000+0000", "updated": "2017-02-24T19:38:12.000+0000" }, { "id": "407997", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Nexus 6 ... 6.0.1 for the android version ", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-24T21:01:43.000+0000", "updated": "2017-02-24T21:01:43.000+0000" }, { "id": "408061", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "tried this with both the latest build and 6.0.1GA and both work (SDK)", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-27T19:12:01.000+0000", "updated": "2017-02-27T19:12:01.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }