Im presently working on an android application which will allow the user to download video and audio content from a server and play them on the phone of the end user.
What I'm trying to do is to secure the audio and video. The files should not be accessible to other applications and the user must not be able to take them off the device and use them.
This is a shot in the dark but can i do this by storing the videos in theSQLLite database as blobs.
And also is it possible to play the videos in android if they are stored as blobs.
I wouldn't use blobs, they are only performant if the binary-files are 256KB or less.
I guess the only way to make the videos secure so the user can't use them is to stream them down from you'r server and deleting the buffer when the Application closes.
On a rootet Device, you have access to every directory, so you can't save the videos on the SDcard or the Phone-Memory.
Related
Recently, I watched a video which says starting from android 11 there will be huge storage restrictions.
For example, if I want to encrypt video, image, audio and save them in local storage, is there any way I can do it in later versions of android?
So, I want to save the encrypted data even if my app is unistalled.
I am developing a digital media app using Google's flutter framework which contains songs, movies and etc. The main focus is, these media content should be accessible only through the app and not by outside methods (eg: media players, file browsers).
Eg: A music file which was downloaded through the app should only be played within the app and not by any media player. In that case, there should be an encryption method which should be used to lock these files from outside world.
In this case, bigger files such as Movies should also be taken into consideration. The size of a file can be anywhere between few kbs to 2-3 GBs.
What should be the better approach when solving this problem?
Is it to
Store everything in a database after encrypting the bytes?
Encrypt the entire file and still keep them in the form of "file"?
The downloaded data should also be able to be consumed quickly once the user requested for it. And once the consume is done, the file should be locked again from the rest of the world.
I am not sure if this topic is too broad but somehow I would appreciate it if anyone could provide me with something to start off.
Thank you.
I have an app which is using android webview .i am able to stream video in webview .i want know how can i allow users to to save videos automatically in thier internal storage which they stream in webview on website ? Thanks in advance
Most videos streaming to a browser (PC or mobile) will not allow download as the owner of the video may not want to allow it be saved and copied etc.
Simple http progressive download may allow you to save the video in a regular browser by simply right clicking on it.
DRM protected video will generally use a video pipeline (a sort of 'path' through your device) that does not allow an application of any kind access the raw video - this is again is to avoid people making unauthorised copies.
If you think the video in your case is allowed to be copied then you may find it easier to write some functionality to act as the streaming client and save the file locally. You could also pass the received stream along to the media player or to a webview if you wanted to play the file in parallel to saving it.
I am working on a cordova android application which will display images and videos.I have the images and videos in the assets folder.I want to protect my resources.I don't want anyone to copy the resources.I have googled for the same and didn't get any proper solution.How to protect files in assets?
Is there any way to encrypt and store videos in assets folder and decrypt it during run time?
My video files will be maximum of 10 MB each file and there are 50 videos in the whole application.
You can definitely do this with DRM - it won't stop someone copying the video files, but as they are encrypted they will not be able to play them back without the correct key.
The process is roughly:
your content is encrypted before it is streamed or downloaded
when the user wants to playback the content the app must request a key for the content from owner of the content or the 'rights authority' (a service which handles keys for content)
The DRM system on the device will securely encrypt the content and play it back using the key it obtained. The video will not be stored in clear format at any point.
Native Android DRM is explained here:
http://developer.android.com/reference/android/drm/package-summary.html
To use this with cordova I think you will have to create a Native plugin - I could not see any cordova DRM API. Alternatively, if you are able to stream the content using the new MPEG DASH format, then you could use a HTML5 video player which supports DRM, such as BitDASH (https://www.dash-player.com).
You need to be aware that all DRM and encryption systems are really just hurdles that make it harder to copy content - at the end of the day if you have a very high quality display and a very high quality camera to record the display, then no DRM protection will save you.
I'm working on an iOS and Android app that allows the user to stream/play videos.
I would like to create an offline mode that gives the user the ability to play an already-saved video. To do so, I would like the app to save locally the currently played video if the user has a WiFi connection.
To do that, I would need a mechanism to read and save at the same time a video.
Any ideas to do that on iOS or/and Android?
read and save at the same time
I guess you would have to span two different threads : one to read, and another to save.
And have the 'read' method try to get data from cache before downloading it.
on iPhone, possible duplicates :
Play video from cache in iphone programatically
Simultaneously stream and save a video?
The method described in these answers - caching download on disk, and read video from that file - should be the same for Android.