[TIMOB-13360] iOS: Removing camera media from temp
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2014-02-26T17:08:07.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2014 Sprint 04, 2014 Sprint 04 API |
| Components | iOS |
| Labels | camera, ios, ipass1, photo, privacy, video |
| Reporter | Aleksey Gureiev |
| Assignee | Ingo Muschenetz |
| Created | 2012-12-04T13:11:12.000+0000 |
| Updated | 2017-03-28T20:33:00.000+0000 |
Description
Once video / picture is shot and returned as a TiBlob, it has to be removed from the "YourApp.app/tmp/capture" folder. Applications like PhoneView provide access to private application data. Since it isn't documented that Titanium leaves the trail behind, it may hurt privacy-related apps, like ours.
(I'll be working on this myself. Pull request to come soon)
Added two pull requests for 2.1.x and the master: * https://github.com/appcelerator/titanium_mobile/pull/3518 * https://github.com/appcelerator/titanium_mobile/pull/3519
The temp blob data being returned to the user can be using using the following code
Titanium.Media.showCamera({ success:function(event) { Ti.API.debug("video was taken"); // programatically hide the camera Ti.Media.hideCamera(); var tmpFile = event.media.getFile(); if (tmpFile) { //delete file if necessary tmpfile.deleteFile(); } }, cancel:function() { }, error:function(error) { //handle error }, overlay:(overlay container), showControls:false, // don't show system controls mediaTypes:Ti.Media.MEDIA_TYPE_VIDEO, videoQuality:Ti.Media.QUALITY_640x480, autohide:false // tell the system not to auto-hide and we'll do it ourself });Closing