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

by dragonksn » Tue, 14 Apr 2009 01:00:02 GMT


Sponsored Links
 Dear all,
I'm a new comer to Android. I want to play a music file located in my
SDCARD image by using my own code. But all the path I have tried with
did not work. The file is located in /myandroid/dcim/Camera/Songs/
track1.mp3 (This seen when I mount the drive to local machine). But
the song can be played by music player of Android.

Can anyone help me with this? I'm very curious with this..

Thanks in advance :)
dragonksn

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



Other Threads

1. Combining app functionality?

Hi, I'm a little new to Android. I was just using my phone earlier
when I had an idea to make it much easier to use.

See, I was about to go for a bike ride, and I wanted to turn on my
phone's Stopwatch app to record my time, set my Away Message on my
instant messengers, turn on GPS and Latitude so my friends could see
where I was, record the exercise with Calorie Counter, and maybe even
tweet about it. But that's so much to do when I'm already standing by
my bike, ready to leave. What if a user could set up a shortcut button
on their home screen to do all of this at once?

When a developer makes their app, they could have a list of available
functions to be accessed. Then the user could go to their home screen
menu and make a new function-combining shortcut, and be presented with
a list of their apps that contain available functions. When activating
the shortcut, notifications or a dialog displays what each app is
doing in the background as a result. Alternatively, there could be a
drop-down menu for the user's "Smart Status," where the user picks
what they're currently doing, and the appropriate functions are
activated.

There are many possible uses for this. Users could have their Instant
Messenger status set for every little thing, like opening the browser,
playing a game, or composing an email, without having to do any extra
work other than setting it up once. Or users could press a button when
they get to work that changes their ringtone, sets their away message,
and records what time they arrived. If Settings supported it, it would
eliminate the need for the popular widget button apps from CurveFish.
Many apps in the market that simply provide better ways of using built-
in functions wouldn't be necessary if this were implemented.

How could this be done? I'm not much of a developer, so don't tell me
to get Android's source and do it myself. I'm just putting the idea
out there. Should this feature be requested?
--~--~---------~--~----~------------~-------~--~----~

2. stopped unexpectedly when run on emulator

You need to provide the -full- stack crawl including, very importantly, all
of the "caused by" clauses which tell you the actual original errors that
happened.

2009/10/12 <huangdeng...@gmail.com>





-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

3. Android graphics advice

4. Connection speed?

5. Getting callback of menu key pressed in service class

6. Getting callback of menu key pressed in

7. How to autoload drivers in Android?