All Questions

207
votes
16answers
154508 views

How to copy files from 'assets' folder to sdcard?

I have a few files in the assets folder. I need to copy all of them to a folder say /sdcard/folder. I want to do this from within a thread. How do I do it?
3
votes
1answers
3529 views

Using Resources Folder in Unity

I have am developing a HoloLens project that needs to reference .txt files. I have the files stored in Unity's 'Resources' folder and have them working perfectly fine (when run via Unity): string ba...
36
votes
11answers
35856 views

Load files bigger than 1M from assets folder

I'm going crazy, I created a file object, so it can be read with ObjectInputStream, and I placed the assets folder. The method works with a file smaller than 1M, and give error with larger files. I re...
297
votes
11answers
143358 views

Using fonts with Rails asset pipeline

I have some fonts being configured in my Scss file like so: @font-face { font-family: 'Icomoon'; src: asset-url('icoMoon.eot?#iefix', font) format('embedded-opentype'), asset-url('icoMoon....
84
votes
10answers
154733 views

How to get URI from an asset File?

I have been trying to get the URI path for an asset file. uri = Uri.fromFile(new File("//assets/mydemo.txt")); When I check if the file exists I see that file doesn't exist File f = new File(file...
61
votes
13answers
116455 views

How to play videos in android from assets folder or raw folder?

I am trying to play a video in android emulator I have the video in my assets folder as well as the raw folder But after doing some research still i cant play video in my emulator i am working on and...
98
votes
2answers
82391 views

Play audio file from the assets directory

I have the following code: AssetFileDescriptor afd = getAssets().openFd("AudioFile.mp3"); player = new MediaPlayer(); player.setDataSource(afd.getFileDescriptor()); player.prepare(); player.start...
75
votes
7answers
35189 views

Rails 3.1 asset pipeline: how to load controller-specific scripts?

If I generate a new controller in Rails 3.1, also a javascript file with the name of the controller will added automatically. Firstly, I thought this javascript file will used only, when the related c...
21
votes
2answers
29803 views

Android WebView JavaScript from assets

How can I make JavaScript and images on my remote HTML page be loaded from assets folder (or just any local resource)?
19
votes
5answers
42687 views

How to open a pdf stored either in res/raw or assets folder?

I'm going to show a pdf in my application, and the pdf has to be bundled with the application. What is a good way to do this? I have read that it might be possible to do this by adding the pdf file ...

Previous Next