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

How to access files in file:///android_assets/?

Is it possible to access the files inside file:///android_assets/ of an installed android application(in emulator or actual device) through DDMS or any other tool? If yes, how?
shri ram
  • 103
  • 1
  • 8
0
votes
2 answers

SQLiteCantOpenDatabaseException Error on Android Studio

I'm trying sample app. I'm populating listview data from sqlite db. DB stored under assets folder. Log cat shows DB couldn't open. My database name "mydb", contain one Table: "month" and three column: jan, feb and march. Check My…
89030943809
  • 157
  • 1
  • 1
  • 16
0
votes
0 answers

Why AndroidAssetStudio generate my icon with different size unnormally?

My source icon was like below. Than I want to get the different size of this image using AndroidAssetStudio Launcher Icon Generator. But what I got was like below. The image was added the white edge that was annoying. How can get the normal image…
liam xu
  • 2,892
  • 10
  • 42
  • 65
0
votes
1 answer

Reading ".properties" file in Android taking too much of time

I am reading a .properties file in android which is stored in assets folder. My .properties file has almost 8000-9000 key value pairs. For loading it is taking almost 4 minutes. Below is my code for reading the .properties file. Properties props =…
anonymous
  • 483
  • 2
  • 8
  • 24
0
votes
0 answers

How to sets generic values in android manifest file or any other res folder using asset in android

e.g : I Want to change application logo and name, as per clients change so how can I do that very specific way in android.
Amol Pawar
  • 23
  • 6
0
votes
0 answers

Android - Different bytecode of text file for release build

I am having problem with different byte representation of my file in assets folder for release build. Some library that I am using is providing licence file that i have included to assets. In debug build the library accepts the licence file but for…
Billda
  • 5,707
  • 2
  • 25
  • 44
0
votes
2 answers

Load different files depending on language

I'm showing in a WebView a local html file with text. How can I load the english version of it depending on the language of the phone? Here is my code: public class Seccion1 extends Fragment { WebView mWebView; @Override public View…
0
votes
2 answers

Read android assets files throw NullPointerException

I am working on android automation test, I create a test project in eclipse. (In automation, it will be packed as apk and deploy onto emulator) And In my project, I want to read a xml file in assets folder. I put my xml file "mytest.xml" directly in…
zhaojing
  • 585
  • 3
  • 11
  • 33
0
votes
2 answers

Why can't I access to assets folder from a simple java class?

I have an Activity class with the name of FirstClass, and a simple Java class with the name of SecondClass. Inside of FirstActivity I want to create a new object of SecondClass like this: SecondClass secondClass = new SecondClass(); Inside of the…
Elyas Hadizadeh
  • 3,289
  • 8
  • 40
  • 54
0
votes
1 answer

Copying an entire folder from R.raw to SD

I have an entire folder that I would like to be in the R.raw folder so that it looks like this: raw/thor/myfirstfile.jpg …
shredder
  • 1,438
  • 13
  • 12
0
votes
2 answers

can't open sqlite file in assets folder to copy to device

This is my first application on Android. I saw a few questions on this matter, but none had the solution for me. I have a database in assets folder, named fmdb.sqlite. I used a code example from this…
0
votes
2 answers

Unable to open SQLite database stored at assets\databases using SQLiteAssetHelper

I am trying to use my SQLite database from assets/databases folder using SQLiteAssetHelper class but I am getting following error:- 09-25 01:34:53.007: E/SQLiteLog(1191): (14) cannot open file at line 30191 of [00bb9c9ce4] 09-25 01:34:53.007:…
Amit Anand
  • 1,225
  • 1
  • 16
  • 40
0
votes
2 answers

getAssetFileDescriptor return null

I need to read files from an expansion file. In the first LOG it shows expansionFile without problem. But when i try to access the files inside zip file according with the docs the file returns null ZipResourceFile expansionFile = null; try { …
Igor Ronner
  • 1,565
  • 2
  • 14
  • 31
0
votes
1 answer

How do I use rectangular local tiles in android mapbox?

Brand new to Mapbox. I'm using the Android SDK version and have local (not cached, nothing from a server) tiles. I would like it if the tiles were not required to be square, but could be rectangular. I'm seeking an example and documentation on how…
Mitch
  • 1,716
  • 3
  • 25
  • 41
0
votes
3 answers

unpack / pack .apk with 7zip cause error during installation

I have a simple in-app browser that displays html files from /assets in a fullscreen WebView. The idea is that customer can change those scripts himself without need of recompiling the APK. I read few articles but when I tried to simply: Rename…
Vojtech B
  • 2,837
  • 7
  • 31
  • 59