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 = > 0) { // while condition is

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

any solution?



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. how to avoid texture wrapping in glDrawTexiOES ?

Hi, I'm basically trying to resize 512x512 texture into 200x200 at

So, I use this function.
((GL11Ext) gl).glDrawTexiOES(0, 100, 0, 200, 200);

It shows what I want but it also displays the mirror portion of upper
image on top screen (0,0) size = 200x100.

any idea how to remove this?

2. how can i use my kml file in a html file


i have found a nice javascript (google-api), where i can make an
overlay on a map:
function initialize() {
  if (GBrowserIsCompatible()) {
    geoXml = new GGeoXml("");

    map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(41.875696,-87.624207), 11);
    map.addControl(new GLargeMapControl());

My question is, how can i use my kml file (on a sd card) istead of the
link in the GGeoXML object

geoXml = new GGeoXml("");

My idea is to use:
HttpGet get = new HttpGet("A_HTML_FILE_WITH_HTMLGOOGLEAPI.html");

In this html file i load the javascript. Must i append "?
to get the data available?


PS: I don't find a GGeoXml function in the "google api for android".
So i decide to use the "html google api". And i can search for a
direction between two point in the "html google-api"

3. My app is getting killed while I launch an external intent

4. Active and deactivate the Wifi Radio

5. Bad Frames dropping in thread

6. Question about API Demo Remote Service example

7. Android Toast Duration