How to access files under assets folder of other apk's?
This will list all the files in the assets folder:
AssetManager assetManager = getAssets();
String[] files = assetManager.list("");
This to open a certian file:
InputStream input = assetManager.open(assetName);
If you want to access file from assets folder use the following code:
InputStream is = getAssets().open("contacts.csv");
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(is);
HttpContext localContext = new BasicHttpContext();
HttpResponse response =httpClient.execute(httpGet, localContext);
BufferedReader reader = new BufferedReader(new
InputStreamReader(response.getEntity().getContent()));
For example: If you have the .ttf file in your assets folder: then you used like this:
Typeface font = Typeface.createFromAsset(getAssets(), "MARKER.TTF");
Here is link: http://developer.android.com/guide/topics/resources/accessing-resources.html#ResourcesFromCode