{ "id": "97615", "key": "AC-3112", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2013-01-22T14:16:30.000+0000", "created": "2012-07-18T23:44:00.000+0000", "labels": [ "android", "image", "intent", "resultactivit" ], "versions": [], "issuelinks": [], "assignee": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48: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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "\r\n\r\n\r\nThe Android intent result activity will get the image objects and image path.\r\n\r\nBut Titanium supporting only for returning the image path . Please review my queries and let me know.\r\n\r\nHuawei U8650 will returning the image path is null. \"It will return the image object.\"\r\n\r\nI have explained the both titanium and android code : The Titanium intent result activity not supporting the object return.\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar address = \"Take the Picture\"; var lblAddress = Titanium.UI.createLabel({ text: \"link an adress :)\", color: 'blue', font: { fontSize: 14, fontWeight: 'normal' }, width: 'auto', textAlign: 'left', top: 1, left: 10, height: 'auto' }); var intent; lblAddress .addEventListener('click',function(){\r\n\r\nintent = Titanium.Android.createIntent({ action: 'android.media.action.IMAGE_CAPTURE',type: 'jpg' });\r\n\r\nvar ImageUri = null var fileNativePath1 = null;\r\n\r\nTitanium.Android.currentActivity.startActivityForResult(intent, function(e) { if (e.error) {\r\n\r\n Ti.UI.createNotification({\r\n duration: Ti.UI.NOTIFICATION_DURATION_LONG,\r\n message: 'Error: ' + e.error\r\n }).show();\r\n\r\n } else {\r\n\r\n if (e.resultCode === Titanium.Android.RESULT_OK) {\r\n\r\n\r\n fileNativePath1 = e.intent.data; // Huawei U8650 will returning the image path is null \r\n\r\n var image1 = fileNativePath1;\r\n var tmp = jpglib.Resize(fileNativePath1,activity2);// code for resizing the image\r\n anImageView.image = tmp; \r\n var img1str = Ti.Utils.base64encode(tmp);\r\n var setimg1str = Ti.App.Properties.setString('getimg1str', img1str);\r\n\r\n\r\n\r\n } \r\n }\r\n});\r\n\r\n});\r\n\r\nwin.add(lblAddress); win.open();\r\n", "attachment": [], "flagged": false, "summary": "Intent Result Activity return Image objects is null", "creator": { "name": "gnanaoli", "key": "gnanaoli", "displayName": "Gnanaoly", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "gnanaoli", "key": "gnanaoli", "displayName": "Gnanaoly", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Android", "comment": { "comments": [ { "id": "228159", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Gnanaoly,\n\nI am able to return the image path using the following code:\n\n{code}\nvar win = Ti.UI.createWindow({\n\tbackgroundColor: 'pink',\n\texitOnClose: false\n});\n\nwin.open();\n\nvar button = Ti.UI.createButton({\n\ttitle : 'button',\n\theight : Ti.UI.SIZE,\n\twidth : Ti.UI.SIZE\n});\n\nbutton.addEventListener('click', function() {\n\tvar intent = Ti.Android.createIntent({\n\t\taction: 'android.media.action.IMAGE_CAPTURE'\n\t});\n\tintent.addCategory(Ti.Android.CATEGORY_DEFAULT);\n\t//intent.putExtraUri('android.media.EXTRA_OUTPUT', Ti.Filesystem.resourcesDirectory);\n\t\n\tTi.Android.currentActivity.startActivityForResult(intent, function(e){\n\t\t\n\t\talert(JSON.stringify(e));\n\t});\n});\n\nwin.add(button);\n{code}\n\nAre you able to return the image path using the code?", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-21T11:41:11.000+0000", "updated": "2012-11-21T11:41:11.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }