How can I prevent file copying from a pen drive? (No external softwares) - copy

I want to place files (MP3s) in a pen drive and only allow users access to listen to the files in the drive but not be able to copy or edit these files.
And yes I know there are usb copy protect softwares but what they usually do is embed the files into an exe file along with required restrictions, but I want the mp3 files to be playable not just in computers but also in cars, TV's and so on.
How can I do this?

No way. If the data can be extracted (in order to be played), it can be saved elsewhere, i.e. copied.
In the worst case one can put a recorder near the sound system and record your music (and this is how many rips are made, especially in cinemas).

Related

Is there any way to split data files into smaller chunks in Unity WebGL builds?

I am limited to the size of web applications I can build by the "Build\application.data" file.
I.e if its over a certain size I cannot upload it certain hosts, github, etc.
Ideally I would like to split the application into multiple data files under a certain size, while the application is still executable.
How would this be possible? Is this something I can do from Unity build configuration?
Can I do it after the build is done?
Can I split the file into chunks by archiving it with zero compression, and somehow still execute it from the browser? There is a file called Build.Loader.js, is it something that can be edited for this purpose?
This is for the purposes of using the application after it has been uploaded, not sharing it, I do not want to compress it into separate archives, or use gitlfs, I've tested this and the application does not work from the browser with github and gitlfs.
Thanks
Unity has 2 technologies for split data file:
Asset bundle
An AssetBundle is an archive file that contains platform-specific
non-code Assets (such as Models, Textures, Prefabs, Audio clips, and
even entire Scenes) that Unity can load at run time
Addressbles
The Addressable Asset System allows the developer to ask for an asset
via its address. Once an asset (e.g. a prefab) is marked
"addressable", it generates an address which can be called from
anywhere. Wherever the asset resides (local or remote), the system
will locate it and its dependencies, then return it.
Both technologies create separate files that you can host on a server and download as needed. Addressable is a newer technology that Unity team recommends.
Probably the total size of the bundle will grow, but user will be able to download only the necessary assets and the amount of data for the user may decrease
If you do not use Unity solutions, you can divide data file into parts. But on the client side (javascript) you will need to download all the parts, connect them and pass to Unity loader. You probably won't be able to use the browser's built-in gzip or brotli (not sure). It seems to be quite difficult.

How to get all the files from Internal and External Storage Programatically?

I want to show device files in a list view and also want to delete files from list view. For this i am trying to get Images, Music and Video files from External and Internal both storage. But it's returning systems file also. I don't need to show system's file.
Please help.....

How to group files according to formats in folder structure in iOS app?

I'm trying to make an app where I can group different files in their respective folders from two accessed servers. For example all pictures from two servers should be in Picture folder and all music files in Music folder of the app.
As I have to access all the files from the server how could I group all the files in above mentioned folders.
Any suggestions how to initiate from above situation
Generally interactions with the app's sanboxed file system are done via the NSFileManager class.
http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
That class allows you to move, copy, delete, etc... You'll likely want to use it to first create your two directories, then use it to save files into those directories as needed.

Importing huge music files into database

We have very huge music files in mp3 formats (very huge more than 1,000,000) and would like to import all these songs into the DB of an application we are developing. Is there any easy method to import such huge files at once. Kindly let me know
Why not just use a filesystem for them - that's what file systems are designed for? Index the filenames in a normalised DB.
Yes, there is
Take a look at how has Apple solved that problem. Go to the iTunes_control folder on the iPod. You'll see that there's a Music sub folder with dozens of folders named f00, f01, ... f50 (50 is arbitrarily big number). Every file has been renamed to a filename that looks like a hash value.
Use the file system to store the files. In the database store the path to the file on the file system together with the mp3 metadata information (artist, name, album, composer, etc) and provide search capabilities over it.
You don't want to store music into the database. Store some kind of URLs to music into the database, with all the metadata you want to keep, and store music into folders on various servers. I am author of radio automation software that used this scheme and we never looked back at our decision.
Main reason for that is that you don't want anyone to be dependent on some database API to extract the music.

Managing resources and keeping them out of version control

My iPhone app will have a map with about 10 points on it. It will play sound files based on the proximity to those points.
What's the best way of managing these resources?
Coordinates and accompanying sound file could be stored in a plist, as an array of dicts with latitude, longitude and file name. Then the sound files could be stored separately.
The plist and sound files should not be version controlled.
How much, and what, should happen compile-time, and run-time? How do I manage this?
The end result should be an app binary with the sound files embedded and the records stored in core data. Doing stuff on first launch of app is also OK.
I think my question could be rephrased to: how do I manage resources programatically, at build time?
Add the sounds folder as a 'folder reference'. Then any files you add to that folder will be included in your bundle. Right click on your project->Add Existing Files then choose 'Create Folder References'