You Are Here:

Community: Developer Discussion Boards

#1 Old Question Playing MP3 using File Connection & MM-API - 2006-06-21, 04:17

Join Date: Jan 2006
Posts: 8
syson
Offline
Registered User
Hi i am trying to play the mp3 files which r on my media card. I can explore the media card using File Connection API. How can i create a player using the path of mp3 files on media card. I am using the following code to create player, when the mp3 file is included in the JAR file (works fine!)

InputStream is = getClass().getResourceAsStream("/sounds/myfile.mp3");
Player p = Manager.createPlayer(is,"audio/mpeg");

Please tell me how to get Player object usimg the path of mp3 file from the media card. Please give the code sample lnes if possible. Thanx

syson
Reply With Quote

#2 Old Re: Playing MP3 using File Connection & MM-API - 2006-06-21, 20:28

Join Date: Mar 2006
Posts: 518
wang_shui
Offline
Super Contributor
Hi,

You may use fileconnection api to play files from the filesystem of the phone or from the media card.

Here is a tutorial on how to use fileconnection
http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

u may also search this forum . we have discussed this in a lot of threads.

Wang
Reply With Quote

#3 Old Re: Playing MP3 using File Connection & MM-API - 2006-06-21, 21:05

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
Here are some documents that would be of some help to you.

MIDP: Mobile Media API Developer's Guide
http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

MIDP: Mobile Media API Example - Media Sampler
http://www.forum.nokia.com/info/sw.n..._v1_0.zip.html

Regards
Gopal
Reply With Quote

#4 Old Re: Playing MP3 using File Connection & MM-API - 2006-06-27, 11:08

Join Date: Feb 2006
Posts: 689
soku123
Offline
Super Contributor
Hi Syson,
The code you have written is to play the file kept in your sounds folder.For playing a file in the MMC you have to set up a file connection to the concerned file that you should play and then create the Input stream.
Thanks
Soku
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with file connection API beenicravi Mobile Java Tools & SDKs 0 2005-10-20 13:06
How to turn a amr. file into a mp3 bo4590 Symbian Media (Graphics & Sounds) 1 2005-08-07 10:24
How to turn a amr. file into a mp3 bo4590 Mobile Java Media (Graphics & Sounds) 1 2005-08-06 14:56
Alternate way to file connection?? balagopalks Mobile Java General 1 2005-01-13 14:03
N6600 - Can't move MP3 file to MMC Card if sent by BT sugaray Bluetooth Technology 1 2004-11-29 12:59

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ