While reading file from sd card it throws "/sdcard/test.txt
(Permission Denied)"  exception
I am using following code to read file and I also set following
permission in manifest.xml

<user-permission
android:name="android.permission.READ_EXTERNAL_STORAGE" />



                               File myFile1 = new File("/sdcard/
test30fps.mp4");
                                myFile1.canRead();
                                FileInputStream fIn = new 
FileInputStream(myFile1);
                                BufferedReader myReader = new BufferedReader(
                                                new InputStreamReader(fIn));
                                String aDataRow = "";
                                String aBuffer = "";
                                while ((aDataRow = myReader.readLine()) != 
null) {
                                        aBuffer += aDataRow + "\n";
                                }

                                myReader.close();

what should i do to read file from SD card?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to