not able to play file when set data source to the sdcard file

by Honest » Mon, 13 Apr 2009 17:55:06 GMT


Sponsored Links
 Hello,
I am trying to play file which is stored in SDCARD in emulator. I have
Linux O/S. So i need to provide command in run configuration.

I am providing following parameter.

-sdcard /usr/android/sdcard/mysdcard.iso -audio oss
[i]

The following is my code to play file.

try
{
mMediaPlayer.setDataSource("/sdcard/test_cbr.mp3");
mMediaPlayer.prepare(); // Giving error.
mMediaPlayer.start();

}
catch(Exception e)
{
System.out.println("exception="+e.toString());
}



It is giving me error when i am calling prepare(). Cans some one tell
me what could be wrong in it ? Am i using wrong separator in run
configuration ?


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



not able to play file when set data source to the sdcard file

by Nithin » Mon, 13 Apr 2009 20:10:22 GMT


 Hi,


Normally, this error occurs, when you didnt put sdcard in emulator.
Launch emulator with SDCard. You put the .mp3 file in "data/misc"
folder and try, if its working then the problem is launch emulator
with SDCard only..

Thanks
Nithin
nithinwarier.blogspot.com
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


not able to play file when set data source to the sdcard file

by Honest » Mon, 13 Apr 2009 21:30:51 GMT


 Thanks nitin for your quick reply. From you suggestion i solved my
problem but i am not geting why it is not able to access file from
sdcard even if the file is available there so there should be
something wrong in it. I also added the command line paramiter which i
am passing so please take a look and let me know if you found
something wrong in it.



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



Other Threads

1. Guna Nya SDCard di Partisi itu buat apa yah? (HTC MAGIC 32A)

Magic pake custom ROM yg uda support apps2sd aja bro jadi tinggal bikin partisi 
di sdcard
@jakontil
ris...@naekgenteng.com

-----Original Message-----
From: "Reza.Iransah" <logay.pek...@gmail.com>
Date: Sat, 27 Feb 2010 00:12:49 
To: Indonesian Android Community [id-android]<id-android@googlegroups.com>
Subject: [id-android] Re: Guna Nya SDCard di Partisi itu buat apa yah? (HTC 
        MAGIC 32A)

pengen coba juga nih....

ternyata internal memory saya udh tinggal 40mb lagi....

ga kerasa gini uy....

tapi bikin app2sd nya susah juga yah ternyata....

punya tutorial buat magic nya ga nih?

soalnya saya ga nemu....
hehehehhehe







> Join:

2. running android application

hi...

I have complete code of an android application running well .
But this application will run only on clicking its icon in the menu

I WANT THIS APPLICATION TO RUN WHEN " 5 " BUTTON ON THE ANDROID
KEYBOARD IS CONTINUOUSLY PRESSED  FOR MORE THAN 5sec

How do i do it..... Plz... help me its urgent


Thanking You in Advance
sid

-- 

3. YM gak bisa login ?

4. 18 android apps to get you started

5. Om kenapa saya udah upgrade radio, stuck di gambar HTC,terus restart-restart lagi....HTC MAGIC 32 A

6. Om kenapa saya udah upgrade radio, stuck di gambar HTC,terus restart-restart lagi....HTC MAGIC 32 A

7. Guna Nya SDCard di Partisi itu buat apa yah? (HTC MAGIC 32A)