Javax.microedition.media.MediaException PLEASE HELP

Hi
I'm currently developing application for the new Motorola i860
I'm writing a player that will be able to play wav/midi/amr/vselp ...
Im trying to skip back and forward using Player.setMediaTime()
When I upload the applicatiopn to the emolator (download from iden.motorola .com) its working great but when I upload the application to the phone I got exception :
"javax.microedition.media.MediaException setMediaTime() is not set"
Any one know why its working perfect on the Emolator and NOT WORKING ON THE REAL PHONE ????

Hi,
Please check if setMediaTime is supported in your device.

Similar Messages

  • Re: javax.microedition.media.MediaException: Unable to realize

    Dear all ,
    I'm getting the out of memory exeception when i'm trying to play large files of size 5mb .
    Because the byte array is not able to handle large data.\
    How can i pass the large files to audio player from file system.
    can any one help me out?
    Thanks,
    Purna

    hi,
    try {       
           vfrm.append("Stage 1\n");         // vfrm is a Form for video playback
           String resfile_name = "http://www.xxxx.com.tr/mobile/test.mpeg";
           StreamConnection c = (StreamConnection)Connector.open(resfile_name);
           InputStream in = c.openInputStream();
           vfrm.append("FileSize :"+String.valueOf(in.available()));
           vfrm.append("Stage 1.1\n");
           Player player = Manager.createPlayer(in, "video/mpeg"); // ------- Error on this line -------
           vfrm.append("Stage 1.2\n");
           player.realize();          
           vfrm.append("Stage 3");
           GUIControl gc;
           if ((gc = (GUIControl)player.getControl("GUIControl")) != null) {          
               vfrm.append((Item)gc.initDisplayMode(GUIControl.USE_GUI_PRIMITIVE, null));          
           vfrm.append("Stage 4");      
           player.start();
           vfrm.append("Stage 5");      
       } catch (Throwable pe) {
           vfrm.append("---"+pe.toString()+"\n");
           vfrm.append("err : "+pe.getMessage()+"\n");      
       }When this code works i am taking these outputs
    Stage1
    FileSize:706564Stage1.1
    --- javax.microedition.media.MediaException
    err : nullI am using a HTC PDA with Windows Mobile 6.0.
    I am so new about this subject. Please help me ...

  • Javax.microedition.media.Mediaexception:Deviceerror

    I am working on nokia 3110 handset. I am trying make application to to record and play sound. I am successfully recording the sound but while playing recorded sound it is giving javax.microedition.media.Mediaexception:Deviceerror. The program is running fine on emulator. I am using content type as audio/x-wav.Could anybody suggest any way???? Code
    private void recordtofile()
    try{
    store = RecordStore.openRecordStore("voicestore",true);
    p= Manager.createPlayer("capture://audio");
    p.realize();
    rc = (RecordControl)p.getControl("RecordControl");
    output = new ByteArrayOutputStream();
    rc.setRecordStream(output);
    rc.startRecord();
    p.start();
    Thread.currentThread().sleep(10000);
    p.stop();
    rc.stopRecord();
    rc.commit();
    byte[] b = output.toByteArray();
    store.addRecord(b,0,b.length);
    InputStream is = new ByteArrayInputStream(b);
    player = Manager.createPlayer(is, "audio/x-wav");
    player.prefetch();
    player.start();
    mDisplay.setCurrent(mMainScreen);
    catch(Exception e)
    {showException(e);
    }

    Hi,
    Please check if setMediaTime is supported in your device.

  • Package javax.microedition.media does not exist

    package javax.microedition.media does not exist
    import javax.microedition.media.*;
    Please tell me why this error occurs.Is it due to midlet version?

    Have you specified the correct setting for your MIDlet project? Note that javax.microedition.media (MMAPI) has been introduced in MIDP2.0.
    Cheers

  • Error Message "javax.microedition.media.Player" not found

    I downloaded a game but when I try to play it I get this message:
    Error starting BrainChallengeVol2_BlackBerry_8700_EN_IGP_101: Class 'javax.microedition.media.Player' not found.
    Does anyone know where I can find this software or if it is available for the 8700?
    Thanks,
    Carolyn

    WMP for Mac has been discontinued and is not written for Intel Macs.
    Instead you should use the free Flip4Mac QuickTime WM plugin available free from Flip4Mac.com
    If you choose to stick with WMP, you'll get better response if you use a forum dedicated to Microsoft's Mac products such as <http://groups-beta.google.com/group/microsoft.public.mac.office> rather than an Apple forum.
    Be sure to search the forum first in case someone has already had a similar question answered. You'll get your answer faster this way. Post your question in the forum if you don't find anything that helps you.

  • UnsatisfiedLinkError: javax.microedition.media.Manager.initMMedia()

    Hello all,
    I'm trying to develop an application recording audio on J2ME. The trouble is that every time I'm calling Manager.createPlayer(anything) method I get the following on my terminal:
    Failed to find configuration object - DefaultConfiguration is used!
    Exception in thread "main" java.lang.UnsatisfiedLinkError: javax.microedition.media.Manager.initMMedia()V
         at javax.microedition.media.Manager.initMMedia(Native Method)
         at javax.microedition.media.Manager.<clinit>(Manager.java:490)
         at local.Temp.run2(Temp.java:65)I tried with
    Player p = Manager.createPlayer("capture://audio");and
    Player p = Manager.createPlayer("oak.wav");and even
    Player p = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR); each and every time the execution stops on the line where createPlayer method is called. I'm running Eclipse version 3.3.2 with EclipseME 1.7.9 and Sun Java Wireless Toolkit for CLDC v 2.5.
    I am quite clueless currently so I would really appreciate a hint explaining what the error may mean.
    Thanks a lot,
    Simon
    ...and BTW: another think I dont get is that each time the exception is thrown the execution stops in spite of the fact, that createPlayer method is in try/catch block with catch catching every Exception (catch (Exception e) ), but that is just a curiosity question.

    Ok, first thing : you MUST NOT use a full system path for a ressource. Create a directory in your netbean project (rsc for instance) and do sthg like :
    player = Manager.createPlayer("/rsc/film.mpg");Second thing, to get supported formats, use :
    String protocols[] = Manager.getSupportedProtocols();
    for (int i=0;i<protocols.length;i++) {
      String contentTypes[] = Manager.getSupportedContentTypes(protocols);
    // Display all strings in the array ....

  • Converting a FCP sequence to Windows Media File - please help!

    Hi fellow mac users, please help if you can would mean the world to me! I'm trying to export an edited sequence (32mins in length) from FCP 5 using Quicktime conversion to a Windows Media File. Although I'm able to launch the process successfully, it just seems to convert the very first minute or two and not the entire thing! I'm not well versed in these technical issues, so have no clue how to figure this out. I've even tried in vain to compress the sequence first, import into FCP and then try to export as WM but no luck. My boss is away and client is pushing and I'm stressing!
    So if you can help, that would be fantastic!
    many thanks in advance.

    Cleaner and Sorenson are huge and complex transcoders. You just need time and a credit card to download and then lots of time to experiment and figure out the quirks of each application. You do not have this time. Telestream offers a competitor called Episode. it's cool.
    Get the full version of telestream's flip4Mac (if it was installed properly you can do this with a click on the system prerf panel for flip4mac). You will need a credit card. Be prepared for a very long transcode to WMP, even on a big Macintosh. I don't think you have the time for any of this nonsense.
    http://www.flip4mac.com/
    bogiesan
    Message was edited by: David Bogie Chq-1

  • Problems with Ipod and Windows Media Player PLEASE HELP

    Ok i am not sure if this is the correct forum or not but i am having a problem. I have a Windows computer (Yes a windows computer please dont everyone yell at me) and i have a new ipod 30 gig video. Ok well when i put itunes on it changes all my music on my computer gets changed to AAC format and i cannot play music in windows media player. Ok well that is not my big issue. I make videos for church using windows movie maker and i cannot import music because nothing windows can recognize Itunes format which is AAC. well is there anyway so i can use itunes and still use WIndows Media Player and Windows Movie Maker... Any info will be greatly appreciated. THANKS ALL

    I believe Quicktime Pro (which is available for Windoze) is capable of opening any WMP files and then you just export it as iPod format. That is how I get video onto the iPod. The Music and Videos all can be placed onto your iPod through iTunes.
    So, if you are creating videos in your program, and want them on your iPod, then that is how you can do it.
    Videos on your iPod have nothing to do with the formatting of your music. But, as the earlier post stated, change your prefs in iTunes to import as MP3. But, your videos HAVE to be in MP4 or M4V format to work on the iPod.
    Good luck... and I'm a j3susfreak too

  • Missing inspector and media browser please help

    Hi, I have been happily editing in iweb - building a new website... but today suddenly I have found it impossible to make the Inspector to appear and the media browser is also absent - no matter how many times I click the appropriate buttons.. on the bottom of the screen - or from the top menu - I have been trying to insert hyperlinks - and the default hyperlink is made - but I cannot see the panel to alter it...
    I have tried rebooting the program several times - and the computer too... but no use. Still no inspector or media browser anywhere in sight - not visible even in Expose
    - although the adjust, colours and fonts menus do appear
    thank you for your help, Janine Roberts
    Macbook   Mac OS X (10.4.9)  

    thank you for the suggestion - I have now run Disk Utility - and, although it picked up a surprising number of permissions to repair relating to Quicktime - Iweb is still faulty. I also tried today reinstalling it from my master disk - but this has not made any difference. I still cannot make the Iweb inspector or media viewer show themseves.
    I am at a complete loss - I was sure reinstalling would work.
    Anyone with more ideas? A lot of web pages are up on a new site - but this has stopped me dead.
    I ran another program today that uses apparently the same inspector and media viewer - Rapid Weaver - and the panels appeared and worked normally - but I cannot import iweb files into this program to sort them out.
    Janine Roberts
    Macbook   Mac OS X (10.4.9)  

  • Premiere Pro - Insufficient Media Error - Please help!

    Hi, everyone!
    I'm working in Adobe Premiere Pro (CS3), taking 3 thirty second video clips, and putting them together, along with an audio track, to make a 1:30 video background with music.
    I'm trying to apply a short cross dissolve to each of the video clips. When I do, I get an error message that there is insufficient media and some frames will be repeated.
    This is a mystery to me, because each of the thirty second clips is clearly longer than the cross dissolve transition.
    The transitions seem to play fine in Premiere, but do not appear to show up in any render so far (I've tried .avi, .mov, and .wmv)
    Any idea why I might be getting this error, and how I can correct the problem?

    Telling him to go study video editing is not helpful at all.
    That depends.  If he does actually go off and study video and can then perform the task better, then it really was helpful.
    I've used a number of other pro video editing programs and I've never had to do this in order to make a cross dissolve work
    Yes, you have.  Any proper transition needs handles.  This is a universal concept, and applies to all editors, all media, and all software programs.  Some programs, Premiere included, may try and 'cheat' the transition by repeating frames or with some other method, but that is not then a proper transition.
    Heck even older versions of Premiere didn't require this step.
    Yes, they have.  All NLEs always have, and always will.
    telling someone to go read the manual or go learn video editing is not what these forums are for
    I would argue that Premiere Pro, and hence these forums, are for those who have already learned video editing.
    First lean, then do.  This applies to any activity.  Those who try and skip step one and show up here looking for help do often meet with some backlash.

  • Media Offline - Please Help!

    Half of the clips in my video project went offline? How do I fix this??? I am a newbie.
    The only thing that has changed was the scrach folder was because it was claiming it was full, I think by default it was loading into the system folders, I don't know why apple choose that by default. Programs only been installed for 2 days.

    I see you are using 10.8.2, that's going to be a road block as it's not a supported OS working with FCE.
    However I used FCE on 10.8.2 and it mostly worked.
    When you say you changed the Scratch Disc location, exactly what where the steps.
    Files only go off-line if FCE looses the file paths.
    Without some specific info on what you have changed we cannot help further.
    Al

  • Using WRT610N / WUSB600N with WD TV Live Media Player - please help

     It's quite incredible, but I am so lost here... spent 6 hours with WD and Linksys tech support online... and still no answers.
     Running Windows 7 Ultimate (64-bit) with WD TV Live, which has the Linksys WUSB600 dual-band wireless-N USB adapter plugged in. My PC has no user accounts / passwords so there are ni profiles.
     I followed the setup / installation instructions from this link:
    http://community.wdc.com/t5/Networking/Enable-Network-Shares-on-WD-TV-Live-amp-Windows-7-amp-Vista-3... 
    Worked like a charm - for 4 days.
    Earlier today, I decided to "upgrade" my old Linksys WRT300N router to the WRT610N new one, so that I can have better streaming with the dual-band. Here is the bottom line: When I now go to "shared networks", I only see the router itself listed. There are no more network shares foldere/directories that were working perfectly with WRT300N. So I decided to "go back" to the WRT300N, and guess what, the network shares dissapeared there also. The WRT300N router is not shown.
    I have tried (and not limited to the following):
    Factory reset my WD HD Live and re-setup from scratch
    re-created the network share folders on the PC re-set advanced sharing settings / media streaming / sharing parameters, etc...
    Uninstalled / re-installed the ETHERNET drivers on my PC REPLACED the WRT610N router with another one (swaped at the store I bought yesterday)
    Disabled Windows 7 firewall/ Kaspersky 2010 antivirus and buit-in firewall of WRT610N
    tried Auto login to network share > On / Off, cleared cache...
    and many other things and still no go
    I do know that the WRT610N is seen by WD HD Live because I am able to stream Youtube videos without a problem and I am able to ping 192.168.0.103 (WD HD Live) from my PC. Also, . the WDTV Live icon is displayed under Network / Media Devices. My Linksys WRT610N is displayed under Network / Network Infrastructure.
    I am at a loss of words.... why would it work fine for 4 days, then when I try to change the router.... it breaks everything. Any ideas?!?!?

    I would advise you to use Media Servers through any of the free media server software out there, until WD comes with a fix for Network Sharing. I tried everything to get Network Sharing work on the WD TV Live (with Windows XP), but to no avail. Sometimes, it would work without any hitch and I could actually finish watching a movie or two in a row. But most times it would just disconnect or even not see my WinXP machine.
    But through Media Servers I haven't had any issues so far and it is quite easy to set up. Just install a media server software on your PC, add some folders to it and you are ready to go. I, myself, use TVersity (the free version) and it works fine. Another free one is Wild Media Server. Just to name a few.
    Keep in mind to disable transcoding in the media server software, as WD TV Live can render most of the common formats itself (see its supported formats).
    The WRT610N also has a built-in media server that turns the USB drive attached to it into a NAS. You will need to turn on uPnP.
    So you could use that too either instead of or along with the media server running on your PC.
    Message Edited by Stoic on 01-22-2010 07:50 AM

  • Javax.crypto.IllegalBlockSizeException :Urgent please help !!!!

    error message:
    ===================================================
    javax.crypto.IllegalBlockSizeException: Input length (with padding) not multiple of 8 bytes
         at com.ibm.crypto.provider.DESCipher.a(Unknown Source)
         at com.ibm.crypto.provider.DESCipher.engineDoFinal(Unknown Source)
         at com.ibm.crypto.provider.DESCipher.engineDoFinal(Unknown Source)
         at javax.crypto.Cipher.doFinal(Unknown Source)
         at CreateRandomImage.doGet(CreateRandomImage.java:69)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service (StrictLifecycleServlet.java:167)
         at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
         at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
         at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
         at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
         at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
         at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
         at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
         at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
         at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
         at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:332)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:251)
         at com.ibm.ws.util.CachedThread.run(ThreadPool.java:138)
    ============================================================
    code part:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException
              String strValue = "";
              // fixedness encrypt key
              byte[] ENCRYPT_KEY = { 2, 69, -70, -5, -94, -15, -22, 93 };
              // get encrypted data from request
         String encryptedData = request.getParameter("encrypt");
         byte[] encryptedDataByte = encryptedData.getBytes();
              byte[] enbytes = encryptedData.getBytes();
         System.out.println("encrypted data >>>>>>>>" + encryptedData);
         try
         SecureRandom sr = new SecureRandom();
         DESKeySpec dks = new DESKeySpec(ENCRYPT_KEY);
         SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
         javax.crypto.SecretKey keyEncrypt = keyFactory.generateSecret(dks);
         Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
         cipher.init(Cipher.DECRYPT_MODE, keyEncrypt, sr);
         System.out.println(" ========== length " + encryptedData.getBytes().length);
         // when execute the sentence, Exception throw !!!
         byte decryptedData[] = cipher.doFinal(enbytes);
         // dencrypted data
         strValue = new String(decryptedData);
         }catch(Exception ex){
              ex.printStackTrace();
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=

    // get encrypted data from request
    String encryptedData = request.getParameter("encrypt");
    byte[] encryptedDataByte = encryptedData.getBytes();
    byte[] enbytes = encryptedData.getBytes();Right here. This gets "encrypt" as a String, and tries to get the ciphertext as that String's bytes. You can't do that. String does horrible, horrible things to ciphertext.
    If you're going to transmit ciphertext as strings, you need to use Base64 to encode it before transfer, and then decode it after, to get your ciphertext back.
    Grant

  • Command or Canvas Events for Recording ?? Please Help..

    Hi I am Abhijith I am a total newbie to the j2me world, And I am learning it now,
    My project topic is "Bluetooth Walkie Talkie " , And I am trying my best and putting
    all my efforts to code incrementally by learning , Before I could implement bluetooth,
    I thought let me complete the recording The audio and playing part first,
    The recording and playing of audio is working fine , But i would like to do it a real manner as Real Walkie talkie does, I want to record audio ONLY when the Key is being
    pressed , and when its released it should exit the player hence saving the recorded file,
    (Actually i dont want to save it in future,i would be sending the bytearray though the bluetooth , but for now , I want the Current module to be ready)
    I tried my best searching online to implement my requirement but the couldnot find
    such events I found Canva's KEYPRESS, KEYRELEASE , etc events but they dint not
    serve my purpose, Let me clearly tell where I am stuck , After the midlet starts(by launching it) then i would like to press a key( keypressed say No 5) for certain
    amount of time and the audio should be recorded only for the keypressed duration ,
    after I release , it should stop recording and save as a wav file .
    Whats happening is When i keep the key pressed , The midlet asks whether to allow
    the recording , for this purpose when I release key the control is going out, and
    i am not able to achieve the needed , I am posting the code here, Please Help me.
    I am not asking for the complete spoon feeding or ready made code, But as a beginner
    I need help from you all to learn and implement it.(at least it should satisfy me,i would feel i have learnt something then)
    Here below is my code ( i AM using WTK 2.5 )
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.media.*;
    import java.io.*;
    import javax.microedition.media.control.*;
    import java.util.*;
    import javax.microedition.io.*;
    import javax.microedition.io.file.*;
    public class Key extends MIDlet{
      private Display  display;
      private KeyCodeCanvas canvas;
      public Key(){
        display = Display.getDisplay(this);
        canvas  = new KeyCodeCanvas(this);
      protected void startApp(){
        display.setCurrent(canvas);
      protected void pauseApp(){}
      protected void destroyApp( boolean unconditional ){
        notifyDestroyed();
    class KeyCodeCanvas extends Canvas implements CommandListener{
      private Command exit;
         public StringItem message ;
         private Player player;
         private byte[] recordedAudioArray = null;
      private String keyValue = null;
      private Key midlet;
         Thread t = null;
         private String eventType = null;
      public KeyCodeCanvas(Key midlet){
        this.midlet = midlet;
        exit = new Command("Exit", Command.EXIT, 1);
        addCommand(exit);
        setCommandListener(this);
      protected void paint(Graphics g){
          g.setColor(255, 0, 0);
          g.fillRect(0, 0, getWidth(), getHeight());
        if (keyValue != null){
          g.setColor(0, 0, 255);
           g.drawString(keyValue + eventType+message, getWidth() / 2, getHeight() / 2,
         Graphics.TOP | Graphics.HCENTER);
      public void commandAction(Command c, Displayable d){
        String label = c.getLabel();
        if(label.equals("Exit"))
          midlet.destroyApp(true);
      protected void keyPressed(int keyCode){
         eventType = "pressed";
        keyValue = getKeyName(keyCode);
        repaint();
      public void keyReleased(int keyCode)
           try
                eventType = "released";
                keyValue = getKeyName(keyCode);
                repaint();
           catch (Exception e)
                System.out.print(e);
      public void keyRepeated(int keyCode)
           eventType = "repeated";
           keyValue = getKeyName(keyCode);
           try
                Thread t1 = new Thread()
                     public void run()
                          try
                               player = Manager.createPlayer("capture://audio?encoding=pcm");
                               player.realize();
                               RecordControl rc = (RecordControl)player.getControl("RecordControl");
                               ByteArrayOutputStream output = new ByteArrayOutputStream();
                               rc.setRecordStream(output);
                               rc.startRecord();
                               player.start();
                               eventType = "Recording";
                               message.setText("Recording...");
                               Thread.sleep(5000);
                               message.setText("Recording Done!");
                               rc.commit();
                               recordedAudioArray = output.toByteArray();
                               player.close();
                          catch (Exception e)
                }; t1.start();
           catch (Exception e)
           repaint();
         //Runnable r1 = new Runnable()
         //    public void run()
         //        try
         //            System.out.print(" here 1");
         //            message.setText(" here 1 ");
         //            player = Manager.createPlayer("capture://audio?encoding=pcm");
         //            player.realize();
         //            RecordControl rc = (RecordControl)player.getControl("RecordControl");
         //            ByteArrayOutputStream output = new ByteArrayOutputStream();
         //            rc.setRecordStream(output);
         //            rc.startRecord();
         //            player.start();
         //            eventType = "Recording";
         //            message.setText("Recording...");
         //            Thread.sleep(5000);
         //            message.setText("Recording Done!");
         //            rc.commit();
         //            recordedAudioArray = output.toByteArray();
         //            player.close();
         //        catch (Exception e)
    }I am really sorry at the end I messed with the code and its altered a Lot, But hope the
    logic Will is clear which is my requirement . I know the code for recording and
    playing is not complete as said, i Messed around a working code and tried adding Canavs
    for keyrepeat method,tried putting a thread around , AT last totally messed,
    I tried working on this for two days but couldn't be successfull , Please Help me!!
    The control goes out when midlet asks whether to allow recording ,
    I thank you anticipation ...
    -Abhijith Rao

    Midlet asking whether to allow the recording are typical permissions prompts specified by MIDP security policy. You need to sign the MIDlet and give it proper permissions.
    Problems like this were discussed in an older thread at WTK forum: *[MIDlet keeps asking for permission.|http://forums.sun.com/thread.jspa?threadID=5347313]* According to one of the posters in the thread, +"...I got it to work on the emulator by setting the permission to 'manufacturer'. It runs smoothly without annoying questions..."+
    If you're interested, check documentation and tutorials on MIDP security policy for more details.
    For events to record audio only when the key is being pressed, consider GameCanvas API, method getKeyStates.
    I am not certain though if doing it this way is a good idea. I doubt that phone users have same habits as those of walkie-talkies; for them it might be indeed more comfortable to use single simple key presses to start and finish recording.

  • Why doeas my voice capture midlet generates echo? please help

    This midlet is for recording voice but it generates an echo of the voice while recording.. and i can't understand why. is there anyone who has any idea? i'd really appreciate any help.. it is required for my term project..
    package com.apress.chapter8;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.media.*;
    import javax.microedition.media.control.RecordControl;
    public class SaveCapturedAudioMIDlet extends MIDlet
    implements CommandListener {
    // the display items
    private Display display = null;
    private Alert alert = null;
    private Command exitCommand = null;
    // players and controls
    private Player capturePlayer = null;
    private RecordControl rControl = null;
    private boolean error = false;
    public SaveCapturedAudioMIDlet() {
    // create the display
    display = Display.getDisplay(this);
    alert = new Alert("Message");
    alert.setTimeout(Alert.FOREVER);
    alert.setString("Capturing for 10 seconds. Say something intelligent!");
    exitCommand = new Command("Exit", Command.EXIT, 1);
    alert.addCommand(exitCommand);
    alert.setCommandListener(this);
    try {
    // create the capture player
    capturePlayer = Manager.createPlayer("capture://audio");
    if (capturePlayer != null) {
    // if created, realize it
    capturePlayer.realize();
    // and grab the RecordControl
    rControl = (RecordControl)capturePlayer.getControl(
    "javax.microedition.media.control.RecordControl");
    // set the alert as the current item
    display.setCurrent(alert);
    // if it is null throw exception
    if(rControl == null) throw new Exception("No RecordControl available");
    // and set the destination for this captured data
    rControl.setRecordLocation("file:///test.wav");
    } else {
    throw new Exception("Capture Audio Player is not available");
    } catch(Exception e) {
    error(e);
    public void startApp() {
    if(error) return;
    try {   
    // first start the corresponding recording player
    capturePlayer.start();
    // and then start the RecordControl
    rControl.startRecord();
    // now record for 10 seconds
    Thread.sleep(10000);
    // stop recording after time is up
    rControl.stopRecord();
    // commit the recording
    rControl.commit();
    // stop the Player instance
    capturePlayer.stop();
    // and close it to release the microphone
    capturePlayer.close();
    // finally, create a Player instance to playback
    // check your device documentation to find out the root.
    // The following will work on devices that have the root
    // specified as shown
    // and start it
    } catch(Exception e) {
    error(e);
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    if(capturePlayer != null) capturePlayer.close();
    public void commandAction(Command cmd, Displayable disp) {
    if(cmd == exitCommand) {
    destroyApp(true);
    notifyDestroyed();
    // general purpose error method, displays on screen as well to output
    private void error(Exception e) {
    alert.setString(e.getMessage());
    alert.setTitle("Error");
    display.setCurrent(alert);
    e.printStackTrace();
    error = true;
    }

    hi, i am trying to make a karaoke player with j2me and i want it to be able to record the user's voice while playing the background song.. how can i synchronize these two? what can i do to make it more efficient?

Maybe you are looking for

  • Screen fades when manuevering mouse

    Hi, I've searched the boards and can't find this issue. I love my new iMac but this is driving me crazy! When I am on the internet and moving the mouse along the screen it keeps fading out..as if going in sleep mode...and the url appears in the middl

  • Manage multiple middleware home

    Hi Experts, I am in the position to install and configure multiple middleware home in the single host as per vendor's requirement. normally when i have a single home it was easier to set environment using .bash_profile. But now, As two of the middlew

  • When will i get BTInfinity?????

    For many months i have been checking when BT infinity will reach me. All the while my exchange (wimbledon) is shown as already set up for the service. when i check my landline number i'm given a due date. As the due date approaches i check again and

  • How to add linked button in grid?

    Hi, Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works. Thanks a lot! P.S. For some reason, i can't use matrix because the data is from a SQL query. Lan

  • Obi 11.1.1.6 installation

    HI Friends, when i was trying installation of obi 11.1.1.6 in windows7 i got the error like " install ipv4 hardware and driver in the system level" My system configuration is Hard disk:500gb Ram:4GB Processor :i3 Please give solution to my problem Th