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
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

The following is my code to play file.

mMediaPlayer.prepare(); // Giving error.

catch(Exception e)

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


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..


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. If I want to dynamically display graphics or text in layout, can I still use xml or I have to hard code?

As per subject, any idea?

Many thanks.


2. RSS feed by HttpURLConnection - html issue

I would like to read RSS feed by following coding:

        /** Get data from the list feed */
        private void GetListFeed() {
                // Get the XML
                URL url;
                try {
                        String ListFeed = getString(R.string.rss_blog);

                        url = new URL(ListFeed);

                        URLConnection connection = url.openConnection();

                        HttpURLConnection httpConnection = (HttpURLConnection) 

                        int responseCode = httpConnection.getResponseCode();

                        if (responseCode == HttpURLConnection.HTTP_OK) {

                                InputStream in = 

                                DocumentBuilderFactory dbf = 
                                DocumentBuilder db = dbf.newDocumentBuilder();

                                // Parse the feed.
                                Document dom = db.parse(in);
                                Element docEle = dom.getDocumentElement();

                                // Get a list of each entry.
                                NodeList nl = 
                                if (nl != null && nl.getLength() > 0) {
                                        int k = nl.getLength();

                                        for (int i = 0; i < k; i++) {
                                                Element entry = (Element) 

                                                        Element title = 
(Element) entry

                                                        Element description = 
(Element) entry

                                                        strTitle = 

                                                        strDescription = 



                } catch (MalformedURLException e) {
                } catch (IOException e) {
                } catch (ParserConfigurationException e) {
                } catch (SAXException e) {
                } finally {

However, it description contains html symbol, such as <br />, it will
stop read and display any thing before it.
For example: abc defg hi <br /> jkl mn opq
At android device, it will shows "abc defg hi" only.

I would appreciate if you guys can help me solve this issue. .....


3. wifi - dhcpcd gateway dsn1 dsn2 server address are getting

4. How can get the latest version of google apks (market ,gmail ,yotube)

5. Kompetisi Ide Aplikasi Untuk Acer Liquid

6. Ternyata sinyal iphone 4 lancar jayaaa

7. Is it possible to get sensor data at regular intervals?