Encrypting files on SD card and sharing it with other apps - blackberry

I would like to store a file on SD card, lets say an mp3 file and encrypt it.
And would like other apps to be able to play them but BB automatically decrypt them?(Does DRMManager do this?)
Basically, I would like to keep the mp3 files locked to the BB device. If they tried to open the mp3 on say a desktop or another BB, they won't be able to open them.
As long as the mp3s are accessed from the same BB they should open fine, using any mp3 player app.

I believe this is exactly what the enableDRMForwardLock() method in ExtendedFileConnection is for.

Related

Can you get a song onto your iPhone thru your app?

I would like to get songs from my computer to my iPhone inside of my own app. This would be a music playing app that would have the ability to load songs into its own directory from some private source like a laptop or cloud storage.
Example: If I have 100 songs on a Google Drive and I write an iOS app that loads those files from the Google Drive into the apps directory.
iOS, iPhone, Swift.
Yes you can download files into your app's Documents directory, which will be private to your app.
Here's a SO question on downloading a file in Swift/iOS that shows some concrete code examples: How to download file in swift?
You can also find many tutorials online on saving files and making HTTP requests in Swift.
You'll need to determine specifically how to make requests to your file provider e.g. Google Drive. This might involve not only the URL itself but also authentication, SSL validation etc. which are deeper topics in themselves but fully supported in Swift/iOS.
Yes, you can definitely download songs to your phone from your computer. You just have to make a directory area in your app and have the song be fetched into that directory.

How protect music file downloaded by my music app?

I am need a solution for protect music file downloaded in an music app.
We have all rights for the audios, so, we need to garante only our app is able to play this audios.
This music app actually is only for streaming. The next update is for implement the functionality for download e play music offline.
I know Spotify , for example, use DRM protection, but it is a little bit controvercious for some people, and I think this is not what we need now.
During my researches, I dont find any concrete solution. So, my questions are which functionalities, libraries or resources can I use to protect the downloaded files.
Maybe I need to encrypt/decrypt the files? But, Swift have a native functionality for this, and have some documentation available?
So, what can I use to protect the audios with Swift, and keep playing the audio only in my own app?
This question gets asked almost daily and the answer is, and will always be, the same - if a user can play your audio on their device, then they can also extract and keep a copy of that audio - no amount of DRM, encryption or any other naive concept anyone dreams up can change this.
You can prevent "script kiddies" from just copying the files off their phone by embedding an encryption key in your app and streaming files through a stream cipher before playing them, but again, it's trivial to reverse engineer and get the key.
You can transcode your .mp3 files to HLS file which will generate one master playlist and several segment files and then you can apply ALS encryption on it using ffmpeg or Apple Media segmenter.
For More Info:
https://www.theoplayer.com/blog/content-protection-for-hls-with-aes-128-encryption

Is there any way to Protect Document Directory in IOS

Is there any way to Protect Document Directory in IOS. Any other can not show it's data via any other software? Any encrypted method Or Password Protected for we can protect Data.
My Application is related to Music App. In My app we download songs in Document Directory.
Any user can listen songs via my application. but they can not access that song via any software.
For ex. If we use iFunbox From Mac we can get every data. We don't want to access my data from that kind of software.
Any way to protect my data?
I don't know any way to encrypt an entire directory on iOS devices but you could take a look at RNCryptor to encrypt the songs that your app downloads.
RNCryptor - Github
You can user it to enrypt the songs individually and decrypt the data before you play them in your app.

Simplest way to get an audio file from an iOS app into the user's music library without violating app store terms

I'm making an iOS app in which I'd like to allow the user to save an audio file (a specific file that the app uses internally, not just any arbitrary audio file) to their music library so they can play it from other apps on the device. Ideally I'd like to save a sound directly to the users music library, but it seems from other similar questions that this is not possible. File sharing with iTunes seems to be the next best solution.
Is there anything about using the iTunes file sharing option for saving audio in this way that violates the app store terms?
Is this the path of least friction for the user, or is there another way to achieve this that I'm missing?

Exporting large audio files

I created an audio recorder app that saves audio files in m4a format. I then decided to add an export feature to allow users to email and text their audio recordings. This works nicely when the audio files are no bigger than 20MB. However, any audio file above 20MB will fail to export. What would be the best way to export files out of the app? I was thinking google drive or dropbox, but the user would have to have a registered account. Are there any services that I can upload a file to and receive a link that can be emailed to the user?
There are plenty of services like that. Dropbox is an example. Here is an overview: http://alternativeto.net/software/dropbox/

Resources