Questions tagged [android-assets]

You can use the `assets` folder to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original filename is preserved. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the the AssetManager. For example, this is a good location for textures and game data.

In Android, you can use assets folder to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original filename is preserved. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the AssetManager. For example, this is a good location for textures and game data.

598 questions
0
votes
1 answer

Xamarin.Forms.Android: Populating 'Environment.SpecialFolder.Personal' with sample data files at compilation/deployment

My application records data from a patient monitor and stores it a '*.dat' file in 'Environment.SpecialFolder.Personal'. The app also allows the user to 'play back' previously acquired recordings. I wish to include a few sample 'dat' files within…
Andy Pybus
  • 21
  • 2
0
votes
1 answer

How to copy a zipped file in Assets folder into the DocumentDirectoryPath?

In a react-native project,I have a zipped file which is in android_assets folder. I want to unzip this folder and copy it into the DocumentDirectoryPath. I have imported react-native-zip-archive and used unzipAssets,but it doesn't seem to work. I…
Aishwarya R M
  • 123
  • 1
  • 10
0
votes
0 answers

Is there anyway to play MP4 file in assets folder with VideoView?

I've searched for this question and all the answers are talking about using raw resource folder. I need to use the assets folder because the app loads the video file very slowly. So, I want to reduce the time and show the video directly.
c-an
  • 3,543
  • 5
  • 35
  • 82
0
votes
2 answers

How to create a folder programmatically in Android

I wonder how you (C#)programmatically create a folder in the Assets Folder in Android. My project is called App1 so the folder I want to create is named: "imagefolder1" The full path look like this: App1/Assets/imagefolder1 How can we create…
Andreas
  • 1,121
  • 4
  • 17
  • 34
0
votes
1 answer

Load sdcard file to html file of assets folder

I'm trying to load sdcard's image file to assets folder's html file using javascript.If in path i put image src as weblink then it loads the link but if I give image src path as sdacrd file path it doesn't load anything path=…
Bhagyashri
  • 182
  • 1
  • 15
0
votes
1 answer

Android Asset Manager unable to load wav file assets from the assets directory

I am have a few wav files that I want to load with the help of Android's asset manager. Unfortunately, everytime I try to do so, I get the following error java.io.FileNotFoundException: audio-file.wav not found I would like to add the following…
Krish
  • 63
  • 6
0
votes
0 answers

How to load video from assets folder to video view?

I have a sub folder inside the assets folder named alphabets. Now I am aware that i can use raw folder instead, but that method doesnt allow me to create sub folder inside raw folder. So i would like to experiment using assets folder instead. I have…
0
votes
1 answer

AssetManager vs Internal Storage: How can I store cross-platform config.json file in Xamarin Android that I want to edit later?

I want to be able to pre-configure my Android app to include a json file that is read/writeable, that is usable on other platforms as well (iOS, UWP). I started looking at AssetManager but found that I could only read the file, not edit it…
0
votes
1 answer

Duplicate images while loading the images from android assets as Bitmap and setting ImaegView using glideV4

I tried to retrieve bitmap from the assets and then try to load the Horizontal recyclerview image list using glide as asBitmap(). I am getting the duplicate images and the mismatch images(loading wrong image in place of the required image). Below…
0
votes
2 answers

How to get the font path in the Assets folder

I create a PDF document using itextsharp and I need to connect the fonts from the Assets folder. At the moment everything works when I throw fonts in the memory of the smartphone. System.String ttf = Android.OS.Environment.ExternalStorageDirectory…
0
votes
0 answers

Splash Screen And Activity with asset manager

My app contains a lot of assets that i am using with AssetManager. Currently my app is taking too long to start up. How can i solve this? or is there any way to show a Splash Screen till the assets are loaded and the next activity is loaded?
0
votes
1 answer

Reading a textfile using StreamReader in Android

So, I'm developing Visual Novel in unity. The application is running smoothly in the pc but now I want it to run in android but the contents in my .txt file is not showing in screen. I assume that the error is that the text file in StreamingAssets…
Eve
  • 43
  • 1
  • 10
0
votes
1 answer

Android Image Asset Studio: icon showing white color of an image as greyish

I wanted to create an icon for A+ (with + superscript). I tried to create using image asset studio. But problem is i am not able to add superscript So i have create a A+ image in gimp. Then i created a app bar icon using android asset stuido. I got…
Santhosh
  • 9,965
  • 20
  • 103
  • 243
0
votes
1 answer

Copy one file from assets to sd

I want to copy ONE file "test.txt" to the SD card. I found tips on how to copy more than one, but they are not working for me... The file is in the root of the assets folder "/test.txt" Thanks.
Paul
  • 321
  • 1
  • 5
  • 8
0
votes
1 answer

Assets files need to be updated on app upgrade

I have a couple asset files stored in the assets folder. I use AssetManager getAssets and copy those files to an external dir: in = assetManager.open(filename); File outFile = new File(getExternalFilesDir(null), filename); out = new…
live-love
  • 48,840
  • 22
  • 240
  • 204