Playing a mp3 audio file in j2me

Hi
I need a code to play a mp3 file in j2me

Hi ,
Well, you can try going through the [The J2ME Mobile Media API.|http://developers.sun.com/mobility/midp/articles/mmapioverview/] It has all the information on how can you make your application to run audio or video files. It also have the example to understand better.
One more example for the same you can find in WTK apps list where it gives to demo for playing media files, both audio and video.
Edited by: hiteshrawat on Jun 12, 2009 12:14 AM

Similar Messages

  • How to play non-standard audio file in J2ME CLDC

    Hello,
    I am developing an application for mobile. In this application I need to save the text and audio data in one file (extention of the file may be .mmo etc.), and then I need to play the audio from that file with the help of a mobile. (the file will be created with the help of a PC).
    I am seeking for help, whether it is possible or is there any other solution? I want to save both text and audio in the same file to facilitate my user.
    Your help or comments on my question will be greatly appreciated.
    with best regard,

    Hi japaneagle!
    This is the way i would solve the problem and i have not tested it, So there can be some problems while implementing it. The approach is based on BASE64 encoding and XML, there can be some some limitation on file size.
    This is the way.
    1) first you have to encode the audio file using BASE64 encoding. Its about reading the bytes from file and encoding to BASE64 char sequence. You can find serveral BASE64 encoder examples in Java (do Google).
    2) Now you have to create a XML file like this, assume that, file type is WAV and you have the encoded char sequnce..
    <AudioFile>
    <AudioFormat>WAV</AudioFormat>
    <TextData>some text</TextData>
    <AudioData>encoded BASE64 char sequence here</AudioData>
    </AudioFile>
    3) Assume that, now file is available in the memory card.Now you have to read it using File Connection API and parse it using kXML inside your MIDlet
    4) After parsing it you will have file type and encoded BASE64 char sequnce..now you have to decode the charsequnce to byte[]. Then create a ByteArrayInputStream using the byte[].. Here you need a BASE64 Decoder..(do Google).
    then create the player using Manager.createPlayer(InputStream stream, String type) MM API;
    Now you can play the file...
    You can add many attributes in the XML file if you want...
    If you are going to use J2ME polish API for your UI then BASE64 won't be a problem, it has a Base64Encoder and Decoder..
    -Jestan

  • MP3 audio file plays well in some browsers, but not all

    I have inserted a media file (MP3 audio file) on a web page to play when clicked.  The play bar shows up and plays perfectly in Chrome just the way I want it. In Explorer the play bar is HUGE and it plays, but repositions itself on the page due to it's large size.  In Safari or Opera the play bar either doesn't play anything or doesn't even show upon the page.  Does anyone have a ny idea what's going on or have a solution? 
    http://www.starcatcluster.com/revue.html

    #1 You must use an HTML5 doc type. Your doc type is XHTML which doesn't support <audio> tags.
    #2  To work in all browsers, you need to include an alternate file type -- either OGG or WMA.  Opera & pre-FF21 browsers do not support MP3/mpeg files.
    http://audio.online-convert.com/convert-to-ogg
    #3 Don't use folder/filenames with spaces on the web.  Rename your media files to Mixdown_with_Vocalists.mp3 (no spaces). 
    #4  Paste this code into a new, blank document.  It should work in all devices:
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>HTML5 Document</title>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <body>
    <audio  controls="controls"  title="Listen to Litterbox Lounge song">
          <source src="Mixdown_with_Vocalists.mp3" type="audio/mpeg" />
          <source src="Mixdown_with_Vocalists.ogg" type="audio/ogg" />
    If you see this, you're using an outdated browser that doesn't support audio.
        </audio>
    </body>
    </html>

  • Assistance needed in trying to import MP3 audio file into Slide Show

    I get the following message when trying to import an MP3 audio file into a slideshow in Organizer 9 "The selected file can not be played because your system does not have the required compressor/decompressor(codec) installed. I am pulling the file from my Itunes folder and I have not had problems with any other file I have downloaded from itunes and changed to an MP3 format.  Does anyone have any ideas?  I really want to use this song in a slideshow for my parents 50th Anniversary.

    Best GUESS is that DRM is getting in the way of the file being used outside of iTunes (DRM = Digital Rights Mgmt = Copy Protection)

  • How to save mp3 audio file from website?

    Is it possible to save an mp3 audio file found on a webpage -- http://..... .mp3 -- to my computer?  It's the typical scenario of a black page with just a playback bar, plus a 'go back 30 seconds' button, pause/play button, time counter and volume button.  Is it possible for this described situation?
    I believe I've also seen pages with similar playback back but also has a dropdown arrow on the right, but I don't remember what was in it.
    Thanks!

    No, not from AL11.
    Execute a function module in SE37
    From client(work station or desktop) to Application server execute this function module:
    ARCHIVFILE_CLIENT_TO_SERVER
    provide source file path (ie client workstation or desktop file path)
    provide target file path (in application server)
    Hope it helps.
    Regards

  • Mp3 audio file restarts after 5 minutes

    When listening to an .mp3 audio file from Internet, the audio only plays about 5 minutes, then starts again from the beginning.  The same behaviour occurs on both my iPAD (mit Retina DIsplay) and iPhone 5.  Any ideas why?

    Restore the phone from Recovery Mode as described here: http://support.apple.com/kb/HT1808

  • How do I listen to mp3 audio files on my iPhone 4s?

    I have recently purchased and downloaded some mp3 audio files onto my personal computer.  I was able to transfer them to my itunes library.  I now want to listen to them on my iPhone 4s.  How do i do this?  If I go to the itunes store application, i can see all of my "purchases", and I can easily download those to my iphone.  But these particular audio files were not purchased from itunes.  So how do I get them to my iphone?  Thank you!!

    I also have purchased and downloaded an mp3 audio file (not from itunes) onto my macbook air.  I was able to transfer it to my itunes library.  I now want to listen to it on my iphone 4s.  How do I do this?  If i go to the itunes store application, i can see  my "purchase"  .   I emailed the mp3 (it went to a downloader automatically).  I couldn't open it in email to listen to it on my iphone 4s.  So I purchased  idownloader pro".  still cannot listen to them on my phone.  Isn't there a way to transfer them without physically connecting the mac to my iphone?  afraid to do this as I screwed up my files, etc doing this in the past!! Any suggestions???    Thank you!!

  • How do you change a music file from quicktime to a mp3 audio file

    i dont know how to change my current music file from quicktime to a mp3 audio file, how do you do it?

    i dont know how to change my current music file from quicktime to a mp3 audio file, how do you do it?
    If you are using a "basic" Mac OS X v10.8.4 install/codec configuration then you can use iTunes to convert to MP3 audio. It has a built in MP3 encoder which you can set up as your default audio import/conversion compression format. Otherwise it depends on how you system's codec components are configured and/or what media applications you have installed.

  • How can I import MP3 audio files into premiere pro cs5?

    Can any one help?
    How can I import MP3 audio files into premiere pro cs5?

    It is really difficulty for me.If you still haven't found a satisfactory answer,please search it on google.Hope you can get your answer as soon as quickly!
    fifa 14 coins
    cheap fifa coins

  • How do you make MP3 audio files?

    I'm running for public office, and a local newspaper invited candidates to submit statements, along with MP3 audio files for display on its website.
    So how does one make an MP3 audio file? Is this something I can do with my MacBook Pro and Leopard alone, or do I need to obtain a special software program?
    Thanks.

    Hi David!
    As Francine mentioned, you will want to use the audio production software that came with your Mac, called Garageband. This will let you record speech, and even layer in music, etc. And when everything is set as you like it, the sound file can be exported in a variety of formats. It will provide a great basic audio recording solution for strictly voice and talking, but you can take things one step further and layer in a music track as an intro or outro if desired for a little more flair, edit out mistakes, etc. A great program that comes right with your Mac. There are nice basic tutorials on the Apple website which give an introduction to Garageband. Good luck David!

  • MP3 audio files in iBooks EPUB3

    hi !
    Can I use .mp3 audio files with muy EPUB3 for iBooks, or is it mandatory to convert everything to .m4a audio files?
    If MP3 are allowed, which media type may be used in the OPF declaration?
    Thanks a lot!

    Assuming you have legal rights to use these tracks on the web, a single player that supports playlists would be the cleanest solution. 
    Pickle Player supports MP3 files in all web devices (including smartphones):
    http://www.pickleplayer.com/examples/
    Flash MP3 Players (NOT supported by all web devices)
    Wimpy MP3 Player
    Premium Beat
    10 more free ones
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • I am unable to burn mp3 audio files to cd.I have tried different speeds but every time it ays failed due to media write error.Can anyone help what to do?

    I am unable to burn mp3 audio files to cd.Every time it says failed due to media write error.I have tried different speeds.Can anyone help pls?

    There are several different incompatible media sold as writeable CDs. You MUST match the media to the abilities of your drive.
    I was flummoxed by buying 8x media when my drive was a 2x drive. I needed the other type, and there was nothing helpful in the diagnostics or the packaging that helped me understand that.
    EDIT: There is an interesting helpful feature buried in System Profiler ... (read the last two lines of the report):
    About this Mac > ( More Info ) > Report > Disc burning

  • I am trying to import an mp3 audio file into garage band for editing.  drag and drop doesn't work. What now?

    I am trying to import an mp3 audio file into garage band for editing.  Drag and drop does not work. any ideas?

    Try reposting in the Garageband forums. You can find it at:
    https://discussions.apple.com/community/ilife/garageband

  • Is there some way I can insert and play these additional audio files, accessible via separate button

    I am converting a CD-ROM course to an online format with that software.
    In the majority of slides created I have used the Import Audio function to insert a primary audio file containing important curriculum information.
    This file typically activates the moment you open the slide.
    So far so good.
    However, in many slides I also need to insert some secondary audio files.
    While the Import Audio function permits me to splice several files into one, this isn't what I want.
    Instead, I need to insert one or more additional audio files that can be activated independently via separate buttons on a given slide.
    I can in fact do this with the Insert Button function, but in the process a Windows Media Player file opens when I convert the project into HTML.
    My question:
    Is there some way I can insert and play these additional audio files, accessible via separate buttons, without creating and opening a Windows Media Player file?
    Thanks

    It is hard to assess the situation without sitting at your computer and having a look myself.  First, if you're seeing space savings I doubt all your files are a compressed format.  Frequently if you try compressing a compressed format file such as AAC (don't confuse with AIFF) you will actually find the file gets larger because there is overhead to compression and if it cannot compress any more then you end up just adding overhead on top of no savings.  Second, normally if you zip the iTunes library it would basically make it inaccessible to iTunes and iTunes would make you a brand new library or at least flag all your tracks as missing (as you are seeing ain part).
    I don't know what computer you are running, which operating system, which version of iTunes.  Unless they have done something radical in Lion in terms of letting you zip your iTunes folder and still have it functional, you either didn't zip the whole thing, or... I don't know.  One scenario is that somehow your media have been split up and you have them in several locations.  One isn't really part of your library except for 80 tracks, so when you compressed it (and I still am puzzled by the compression unless it was AIFF files you were no longer using), it didn't really make much difference to the playability.  Then you have an untouched library elsewhere.
    Use the Reveal In Finder command to see where some of those problem files are located vs. where the playable files are located.

  • Playing DJ mixed audio files?

    It seems somehow that when I play downloaded audio files that are a DJ mix compilation, iTunes and my iPod seem to insert a momentary silence between songs when switching to the next song. I know for sure that this is not the case with windows media player. Anybody got a solution for this? It gets annoying because it ruins the transition between songs that are mixed back to back by a DJ...
    Reuben

    iTunes will convert wma to mp3 (or acc) format. Here are the instructions:
    To convert a song's file format:
    Choose iTunes > Preferences, then click the Advanced button at the top of the window and click Importing.
    From the Import Using pop-up menu, choose the encoding format that you want to convert the song to, then click OK to save the settings.
    Select one or more songs in your library, then choose Advanced > Convert Selection to MP3, Convert Selection to AAC, Convert Selection to Apple Lossless, Convert Selection to AIFF, or Convert Selection to WAV. (The menu item changes to show what's selected in your Importing preferences.)
    To convert all the songs in a folder or on a disk, hold down the Option key and choose Advanced > "Convert Selection to," then choose the folder or disk containing the songs you want to convert. All the songs in the folder or on the disk will be converted except songs you purchased from the iTunes Store. (Purchased songs are encoded using a protected AAC format that prevents them from being converted.)
    Glor

Maybe you are looking for

  • Report using BI Statistics

    People, I activated the BI Statistics in SAP/BW. The Multicube 0BWTC_C10 is active. Will I can generate a report related to load data (time of loading, the load status, etc), using this multicube (0BWTC_C10)?

  • Cannot get apple mail and gmail to sync properly

    I use apple mail for my gmail account. the messages dont seem to sync properly - eg i try to empty the trash and they pop back in there. i changed the settings to what google say to use but now it is downloading 13000 messages. I loged onto my online

  • Query is running but status shows INACTIVE

    Hi All, I am running one query and is still running but when i checked v$session the status shows INACTIVE since long time.. Can somebody please help me to understand why the status is INACTIVE even if the query is running.. Is my session waiting for

  • Show Package Content option not available in Ctrl+click

    Hi, I just installed Mozilla's Thunderbird email SW (v. 1.5.0.5) and I'm trying to import the mail I had accumulated previously in Mail 2.1 (this is under OS X Tiger 10.4.7, sadly running on a pretty old G4 400 MHz, AGP Graphics). The instructions fr

  • 9i or 10g?

    I'm new to Oracle and want to learn. A friend suggested starting with 9i to learn the product. Good idea? If so, I've downloaded it onto my Vista PC and get a "not compatible with this version of Windows" message when I start setup.exe. Any advice? T