×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    Playing mp3 files on memory card using Player class in MMAPI

    Hi all,

    First of all I am new to J2ME and S40 development so kindly excuse any dumb statements and correct them if make any ok?

    I wish to develop an mp3 for my phone (Nokia 5310) and I after reading up a lot on the player class, I am lost with regard to playing audio files (mp3s) stored in the phone's memory card. All the examples i found are related to playing off websites. I am aware of how to access the file system in my phone.

    I just need direction to using a Player class to play such files.

    Would the following do the trick...

    Player myPlayer = Manager.createPlayer("file:///E:/musicfile.mp3");
    myPlayer.start();

    Any help would be GREATLY appreciated.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Playing mp3 files on memory card using Player class in MMAPI

    Welcome to the Forum Nokia Discussion Baords....

    MMAPI supports playing mp3 files. Depending upon the device capabilities and size of the mp3 files, an MP3 player can be created on J2ME phones. Well you should note that not all the devices have the support for the mp3 file.

    You should also note that the when you open the connection, you should do this inside the thread, in order to avoid the deadlock.
    As you have started the player as soon as you create it, that not correct you should follow the life cycle of the player, where it is mentioned that before you start the player you should call the realized() and prefetch() methods then you must call start().

    Please read the MMAPI docs for more information where everything is explained in much more details.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Replies: 2
    Last Post: 2009-10-06, 10:47
  2. Urgent Help Required in Player Class ( MMAPI )
    By ccsCoder in forum Mobile Java Media (Graphics & Sounds)
    Replies: 9
    Last Post: 2009-04-06, 07:56
  3. MMAPI MP3 playback memory limit on Nokia 6680
    By LittleBigWam in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-07-04, 09:29
  4. MMAPi player finished playing
    By erviins in forum Mobile Java General
    Replies: 1
    Last Post: 2005-11-28, 16:29
  5. Audio Player / MMAPI Class
    By laukikwatve in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-07-06, 11:54

Posting Permissions

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