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
-1
votes
1 answer

Load html from SQLite database and images from assets?

I am developing a android app, I need some help from experts, my scenario is below. I am storing html(text) in SQlite database, in that html I have some images, can I load those images from assets folder. I load html from database, images(src) in…
-1
votes
1 answer

AndroidStudio: flavor with a subset of assets folder

I have an assets folder in main and three flavors. Each one of them needs to import only a subset of those files. However some of them needs to be shared. Let's make an example. My assets folder in main contains four subfolders: A,B,C,D flavor1 must…
-1
votes
1 answer

Why i can't copy from asset folder in "Lg g2, Android 4.4.2" well as in other mobiles?

For months the code provided in this answer was ok for me (Android - Copy assets to internal storage) to copy pdf files.....until yesterday a client report me that on his "Lg g2, with Android 4.4.2" this does'nt work....the app does'nt crash but the…
lienmt
  • 147
  • 8
-1
votes
1 answer

Do not hardcode "/data/"; use Context.getFilesDir().getPath() instead

I need to copy my database from Assets folder to "/data/data/com.example.provadatabase/databases/" i was using this code private static String DB_PATH = "/data/data/com.example.provadatabase/databases/"; private static String DB_NAME = "MN1"; and…
user3293120
  • 63
  • 1
  • 7
-1
votes
3 answers

Change App Icon And Name From Outside

Is there any way that set the application Icon and Name from an external resource such as an image which embedded inside the assets/ folder in the project? Or is there any way that let us set icon and name of app without using AndroidManifest.xml…
Soheil Setayeshi
  • 2,343
  • 2
  • 31
  • 43
-1
votes
1 answer

Android- XML database from the ASSETS

i want to pull out data from xml database that placed in the assets folder. // a sample of the database 3,2 1,1
user1979976
  • 47
  • 1
  • 8
-1
votes
2 answers

Copy files from asset to SD card

I'm new in developing Android app. Regarding my question, I've found the following post, but I'm not sure how to implement it to my existing project. How to copy files from 'assets' folder to sdcard? I would like to implement it to ZhuangDict, a…
user2190227
  • 23
  • 1
  • 7
-1
votes
3 answers

Using the same activity but changing the contents that are displayed

I am developing an application in which when an activity loads it shows a textfile(.txt) in a scrollview. Just Below the text file I have two buttons(playAnimation and playAudio) which when pressed play the corresponding files(swf and mp3…
D'yer Mak'er
  • 1,632
  • 5
  • 24
  • 47
-2
votes
1 answer

Unable to pass context from main activity to non-activity using main function

I have a MainActivity class where I have implemented a main function. This main function calls a non-activity class by passing a context (unable to implement). In the non activity class, I want to access a file from the assets folder (which requires…
gabbar0x
  • 4,046
  • 5
  • 31
  • 51
-2
votes
2 answers

How To OverWrite Asset Folder Image In Android

I have an images in asset folder , I want to share that images into another user like email , whats app etc .., Before that I want to draw some text on my share image form asset folder , and I want to overwrite into same asset folder then I want to…
-3
votes
1 answer

How to save many story in assert in android

I am creating an application where data are saved in .txt file in assets folder, I am trying to retrieve my data but I am not able to do, My teacher conditions to not to use SQLite and shared preference.
Giang Hoàng
  • 11
  • 1
  • 2
-3
votes
1 answer

accessing assets files from class

i had this in my class: private Context mCtx = getBaseContext(); then the following code is my other class from which i want to use a file dictionary.txt from assets folder, I get IO Exception. Please Help public class RandomStringGenerator { …
Neo- Ex
  • 13
  • 2
-7
votes
2 answers

How to parse json from asset folder to listview?

I want to parse text and image from a json on file in asset folder to my listview. Please explain clearly because I am biginner in android. Give me complete codes of all files. Thank you a lot.
1 2 3
39
40