I don't know how to use the path setDataSource(path) of MediaPlayer?

by rylance » Tue, 14 Apr 2009 16:01:22 GMT


Sponsored Links
 Hi

If you have pushed the songs to the root of your sdcard then just use
setDataSourece("/sdcard/mySongName.mp3"), make sure you have set the path to
your image in Eclipse (if you are using Eclipse), make sure you are using
the correct run configuration a simple test would be from shell run adb
shell ls /sdcard (or use ddms file browser) then you can see if you have
successfully "installed" your image file.

The important thing to remember is that mp3's location on your pc is
irrelevant and that the phone plays songs from the "sdcard".





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



Other Threads

1. How can an activity detect that its application is about to run out of memory?

For the benefit of all the other applications, you *always* should :)
Anyway, maybe Runtime.freeMemory() can help...
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#freeMemory()
---
sergi.ve...@gmail.com
["In theory, theory and practice are the same. In practice, they are not."]






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

2. Command line parameters to Instrumentation test case

All,

Is there a way to provide command line parameters to Instrumentation
test case. I know in regular jUnit test cases, we can specify -
D<arg_name>="value". Can I do something similar?

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

3. Modifying the call card (in-call screen)

4. Trouble getting values from a data driven Spinner

5. Android Dev Phone 1 + Shipping to Germany

6. Question about the use of FrameLayout

7. group delivery options settings ineffective