Re: [android-developers] How to read file from assets dir?

2010-12-31 Thread Ramesh Solanki
InputStream myInput =contextname.getAssets().open(filename); -- Thanks regards Ramesh Solanki Dignizant technology Surat India Email: rkindia1...@gmail.com rkindia1...@yahoo.co.in -- You received this message because you are subscribed to the Google Groups Android Developers group. To

[android-developers] How to read file from assets dir?

2010-12-30 Thread Stephan Wiesner
Hi, I want to read a txt file that is deployed with my application. The file is in the assets directory and I try to read it with: String url = file:///android_asset/text.txt; InputStream instream = openFileInput(url); This results however in: 12-31 07:05:46.638: DEBUG/GMAP(14396): Read

Re: [android-developers] How to read file from assets dir?

2010-12-30 Thread Dianne Hackborn
API demo here: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/content/ReadAsset.html On Thu, Dec 30, 2010 at 10:09 PM, Stephan Wiesner testexpe...@googlemail.com wrote: Hi, I want to read a txt file that is deployed with my application. The file is in

Re: [android-developers] How to read file from assets dir?

2010-12-30 Thread Stephan Wiesner
thanks :-) 2010/12/31 Dianne Hackborn hack...@android.com API demo here: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/content/ReadAsset.html On Thu, Dec 30, 2010 at 10:09 PM, Stephan Wiesner testexpe...@googlemail.com wrote: Hi, I want to read a

Re: [android-developers] How to read file from assets dir?

2010-12-30 Thread Ankur Avlani
String [] fileList = getAssets().list(textImages); Note, textImages is a folder under Assets. for (int i = 0; i fileList.length; i++) { InputStream is = getAssets().open(textImages/+fileList[i]); } Thanks, Ankur. On Thu, Dec 30, 2010 at 10:09 PM, Stephan Wiesner