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
2 answers

Read 1mb size of .bin file from Assests folder in android eclipse in linux environment

This is my code for Reading .bin file. name:Testfile.bin location : Assets In the byteRead(pathtobinfile) function I want to pass bin file path as a String. how to get the bin file path. Any idea please!!! public byte[]…
Tejas
  • 358
  • 5
  • 23
0
votes
2 answers

Issues with large APK file

I'm creating a version of my game for app stores such as Amazon, which don't have the APK expansion mechanism - so I put all the files in my "assets" folder. However, my 300+ MB APK seems to create a lot of problems: When I try to install it with…
SirKnigget
  • 3,614
  • 2
  • 28
  • 61
0
votes
0 answers

Sending Image as attchment from assets

Here is my code It does sends the mail but without any Image as attachment EditText eto=(EditText)findViewById(R.id.etxtTo); EditText esub=(EditText)findViewById(R.id.etxtSubject); String to=eto.getText().toString(); String…
Rajnish Mishra
  • 826
  • 5
  • 21
0
votes
2 answers

goto page javascript not working in android

I am creating webapp using html5, css3, javascript, Phonegap in dreamweaver. I am using below code to do a goto page feature. it will open a an html page. but my problem is it's not working in android app. any help? javascript Code function…
0
votes
1 answer

Which is a better strategy for monetizing in game assets, In-App purchases or multiple APK delivery?

I know Google Play has an excellent system for In-App purchasing. However, my thoughts are that the general public pigeon holes games with In-App purchasing strategies into a "taboo" list. Also, I'm a one person app developer (like most of us)…
0
votes
1 answer

how to get the path of the image(.png) file that is stored in assets folder in android

I have few images in assets folder i want to retrieve the path of the each image file and copy them into array and finally set to image view with some condition. i have used the below code.But it did not workout for me. may i know where i am going…
user1903270
  • 77
  • 3
  • 14
0
votes
2 answers

Images in Android assets subfolder do not display in WebView

I've seen a lot of similar questions here, but none of them seem to be exactly my problem. I'm loading a local html file from a subfolder of my assets folder into a WebView. The file is located in assets/myfolder/myfolder2/test.html. Also in…
mattgmg1990
  • 5,576
  • 4
  • 21
  • 26
0
votes
2 answers

How to apply CSS into WebView for remote html(url)?

I have a web page for example "example.google.com/login?" I have loaded this url into the WebView using WebView.loadUrl() method. I have the css for this webpage and saved it in under the assets folder. Now I want to apply custom css for this…
Dinesh
  • 965
  • 2
  • 11
  • 23
0
votes
1 answer

Android: File not showing up on file system while trying to copy SQL file from assets to app data directory

I am trying to ship an SQL file with my Android application and have the app use it. I have the file in the assets folder and I check for it and copy it if necessary when the app is created. I followed this blog post:…
0
votes
2 answers

Unable to set font in BaseAdpater class?

this is the getView function of classBinderData extends BaseAdapter: public View getView(int position, View convertView, ViewGroup parent) { View vi = convertView; if (convertView == null) { vi =…
Frozen Crayon
  • 5,172
  • 8
  • 36
  • 71
0
votes
0 answers

Image from asset folder - out of memory exception on set image to imageView

I have simple code (adding image to imageView from asset folder): InputStream path = getAssets().open("z1_1.jpg"); Bitmap bit = BitmapFactory.decodeStream(path); imageView.setImageBitmap(bit); When this code execute it throw error: FATAL EXCEPTION:…
0
votes
1 answer

Android: Can TextView display contents of a text file (asset ot raw) using XML only?

I will be having large text files (privacy statements, etc, probably no more than 100k) and I'd like to have them in either /assets or /raw folder, not in my @strings file. Also, I'd like to load them in a text view from the xml, I know I can do it…
George
  • 3,727
  • 9
  • 31
  • 47
0
votes
4 answers

Access assets folder's files with wildcards or regex

Is there any way to access a file into assets folder by name with regular expression? Only selected one file but obvious the suffix into the name Something like: aFD =SessionManager.getAppContext().getAssets().openFd("box*.png"); The case: …
Zeus Monolitics
  • 832
  • 9
  • 19
0
votes
2 answers

File is not opening from Assets in Android

I am trying to read images from Assets.In Assets i have been using a-z folders and these folders contains images with the starting name of folder like if there is folder named YImages then images in this folder image's names are also starting with Y…
User42590
  • 2,473
  • 12
  • 44
  • 85
0
votes
1 answer

Android getAssets() method throws NullPointerException

I'm trying to get assets of my app from Service and i get nullpointexception. I found few articles about it.but i don't get where my mistake. Where is the code: public class OCRService extends IntentService{ private static final String TAG =…
yaroslav prokipchyn
  • 472
  • 2
  • 8
  • 17