can't read mp3 file from sdcard

by zeeshan » Thu, 05 Mar 2009 17:53:23 GMT


Sponsored Links
 Hi Mates,

i am trying to write mp3 file in OutputStreamWriter.

here is the code:

String fileName="/sdcard/test_cbr.mp3";

byte [] buffer = new byte[1024*4];
int bytesRead = 0;

FileInputStream is = new FileInputStream(fileName);

// everything fine untill here

while( (bytesRead = is.read(buffer)) > 0) { // while condition is
false
                    wr.write(buffer,0,bytesRead);
                    wr.flush();
                }


it can access the file and makes the FileInputStream object but cann't
read. it doesn't go in While loop

any solution?

Thanks

--~--~---------~--~----~------------~-------~--~----~



can't read mp3 file from sdcard

by zeeshan » Thu, 05 Mar 2009 19:52:59 GMT


 its working now!
actually it was read permission problem.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. UI Hero

Dear all,

Mau tanya donk. Dulu pernah lihat "racun" boss L, magic dengan UI hero. Mantep 
banget.
pertanyaan: apakah nexus 1 atau miley bisa pake UI tersebut? Itu sense UI HTC 
ya namanya?
Download dimana ya?

Thanks in advance.


Thank You & Best Regards
Andreas
d'ILLUSION studios 
3D Animation & Visual Interactive

 


Sent from my BlackBerry smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

-- 
"Indonesian Android Community [id-android]" 

2. Increasing Frame Rate

Anyone knows how to increase the fps in android?? I am developing a 2D
game using rokon engine but i am getting only 7-8 fps. How can i
increase the frame rate, is there any method to set the fps ....

-- 

3. the removal of android drivers from the staging tree

4. Apps not appearing in market place on certain phones

5. Fast kernel switching (chain loading etc) ?

6. Zooming on android - google maps becomes slower

7. HttpPost, ssl and error 'Not trusted server certificate'