{ "id": "134656", "key": "AC-1271", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-15T04:02:44.000+0000", "created": "2014-08-13T10:36:38.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:40.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hello,\r\n\r\nWe are trying to record video in android device as per : https://gist.github.com/dawsontoth/832488\r\n\r\nBut we have very wired issue same code is working fine in some device and in many device (like HP Slate 21 Pro) it is giving NULL for e.intent.data and not able to get recorded video.\r\n\r\nPlease help.", "attachment": [], "flagged": false, "summary": "e.intent.data is null for video recording", "creator": { "name": "anisvora", "key": "anisvora", "displayName": "Anis Vora", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anisvora", "key": "anisvora", "displayName": "Anis Vora", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "SDK : 3.2.3.GA , Window 8.1 , Android Development", "comment": { "comments": [ { "id": "321541", "author": { "name": "anisvora", "key": "anisvora", "displayName": "Anis Vora", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hello Experts,\r\n\r\nAny update on this ?\r\n\r\nRegards,\r\nAnis", "updateAuthor": { "name": "anisvora", "key": "anisvora", "displayName": "Anis Vora", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-09-03T10:07:13.000+0000", "updated": "2014-09-03T10:07:13.000+0000" }, { "id": "361654", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Android video recording is working according to the sample code below.\r\n\r\nh5. Test Environment\r\n\r\nCommand-Line Interface, version 4.1.2\r\nSDK 4.1.0.GA\r\nAndroid 4.4.2, 5.1.0\r\n\r\nh5. Code Sample\r\n{code}\r\n/**\r\n * This sample lets you record and share video with Appcelerator Titanium on Android.\r\n * REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK\r\n * http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html\r\n */\r\n\r\n/**\r\n * First, create our UI. We'll have two buttons: record, and share.\r\n */\r\nvar win = Titanium.UI.createWindow({\r\n title: 'Video Recording from Appcelerator Titanium',\r\n backgroundColor: '#fff'\r\n});\r\nvar recordButton = Titanium.UI.createButton({\r\n top: 10, left: 10, right: 10, height: 35, title: 'Record Video'\r\n});\r\nwin.add(recordButton);\r\nvar shareButton = Titanium.UI.createButton({\r\n top: 50, left: 10, right: 10, height: 35,\r\n title: 'Share Recorded Video', visible: false\r\n});\r\nwin.add(shareButton);\r\nvar saveButton = Titanium.UI.createButton({\r\n top: 100, left: 10, right: 10, height: 35,\r\n title: 'Save Recorded Video', visible: false\r\n});\r\nwin.add(saveButton);\r\nwin.open();\r\n\r\n/**\r\n * We'll use the following variable to keep track of the result of our recording action.\r\n */\r\nvar videoUri = null;\r\n\r\n/**\r\n * When they click this, we'll start the video capture activity and wait to hear back from it.\r\n */\r\nrecordButton.addEventListener('click', function() {\r\n // http://developer.android.com/reference/android/provider/MediaStore.html\r\n var intent = Titanium.Android.createIntent({ action: 'android.media.action.VIDEO_CAPTURE' });\r\n Titanium.Android.currentActivity.startActivityForResult(intent, function(e) {\r\n if (e.error) {\r\n Ti.UI.createNotification({\r\n duration: Ti.UI.NOTIFICATION_DURATION_LONG,\r\n message: 'Error: ' + e.error\r\n }).show();\r\n } else {\r\n if (e.resultCode === Titanium.Android.RESULT_OK) {\r\n videoUri = e.intent.data;\r\n Ti.UI.createNotification({\r\n duration: Ti.UI.NOTIFICATION_DURATION_LONG,\r\n message: 'Video captured; now share or save it!'\r\n }).show();\r\n // note that this isn't a physical file! it's a URI in to the MediaStore.\r\n shareButton.visible = true;\r\n saveButton.visible = true;\r\n } else {\r\n Ti.UI.createNotification({\r\n duration: Ti.UI.NOTIFICATION_DURATION_LONG,\r\n message: 'Canceled/Error? Result code: ' + e.resultCode\r\n }).show();\r\n }\r\n }\r\n });\r\n});\r\n\r\n/**\r\n * When they click this, we'll start an activity with an intent chooser to let the user\r\n * choose how they want to share their video.\r\n */\r\nshareButton.addEventListener('click', function() {\r\n var intent = Titanium.Android.createIntent({\r\n action: Titanium.Android.ACTION_SEND,\r\n type: 'application/octet-stream'\r\n });\r\n intent.putExtraUri(Titanium.Android.EXTRA_STREAM, videoUri);\r\n Titanium.Android.currentActivity.startActivity(\r\n Titanium.Android.createIntentChooser(intent, 'Send Video via'));\r\n});\r\n\r\n/**\r\n * When they click this, we'll save the video to the SDCard and tell the user where to find it.\r\n */\r\nsaveButton.addEventListener('click', function() {\r\n var source = Ti.Filesystem.getFile(videoUri);\r\n var target = Ti.Filesystem.getFile('appdata://sample.3gp');\r\n // note: source.exists() will return false, because this is a URI into the MediaStore.\r\n // BUT we can still call \"copy\" to save the data to an actual file\r\n source.copy(target.nativePath);\r\n\r\n Ti.UI.createNotification({\r\n duration: Ti.UI.NOTIFICATION_DURATION_LONG,\r\n message: 'Saved to: ' + target.nativePath\r\n }).show();\r\n});\r\n{code}\r\n\r\nThe code is working in Android. We don't have the device (HP Slate 21 Pro) to test. Thanks.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-29T09:40:40.000+0000", "updated": "2015-09-15T04:02:37.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }