×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    8

    Question Playing MP3 using File Connection & MM-API

    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

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Playing MP3 using File Connection & MM-API

    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

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Playing MP3 using File Connection & MM-API

    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

  4. #4
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: Playing MP3 using File Connection & MM-API

    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

Similar Threads

  1. Problems with file connection API
    By beenicravi in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-10-20, 12:06
  2. How to turn a amr. file into a mp3
    By bo4590 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-08-07, 09:24
  3. How to turn a amr. file into a mp3
    By bo4590 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-08-06, 13:56
  4. Alternate way to file connection??
    By balagopalks in forum Mobile Java General
    Replies: 1
    Last Post: 2005-01-13, 13:03
  5. N6600 - Can't move MP3 file to MMC Card if sent by BT
    By sugaray in forum Bluetooth Technology
    Replies: 1
    Last Post: 2004-11-29, 11:59

Posting Permissions

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