## Specifying a file path and name in mMediaPlayer.setDataSourc

All your problems with Audio, Video and Images.

### Specifying a file path and name in mMediaPlayer.setDataSourc

mMediaPlayer.setDataSource(path);

what is the format of the 'path' paramter?

E.g. My file is c:\program files\file1.mp3. How do I specify the file name and path to the function?

Thanks
dev222
Freshman

Posts: 3
Joined: Sun Jan 23, 2011 9:58 pm

### Re: Specifying a file path and name in mMediaPlayer.setDataS

It's the path on the device's filesystem. For example, if it is on the root of the sdcard, then it would be /sdcard/file1.mp3
jonbonazza
Master Developer

Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA