cannot force the player to stop playback of the audio file

Hi guys,.

I'm stuck with the pretty easy task. I have an audio player, start playing the audio file and I just want to stop it, do not wait until the player arrives at the end of the media. But nothing happens! The media playing contiunes. And there is no response at all to my call to the stop method.

Here is my sample code. I start player and is going to stop it in 3 seconds.

  private void play(InputStream path, String type) {

    try {
        // create an instance of the player from the InputStream
        player = javax.microedition.media.Manager.createPlayer(path, type);
        player.realize();
        player.prefetch();
        VolumeControl volumeControl = (VolumeControl) player.getControl("VolumeControl");
        volumeControl.setLevel(100);
        // start the player
        player.start();

        new Timer().schedule(new TimerTask() {
        public void run() {
            try {
            player.stop();
            } catch (MediaException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            }

        }
        }, 3000);

    } catch (final Exception ex) {
        UiApplication.getUiApplication().invokeAndWait(new Runnable() {
        public void run() {
            Dialog.inform(ex.toString());
        }
        });
    }
    }

BlackBerry jde 4.5.0

device Curve 8310

I understand where the problem was.

So be patient while creating player and pass the correct audio type.

In my case I have played the .wav files created with "audio/mpeg" type player. That is why all the evils.

Tags: BlackBerry Developers

Similar Questions

  • blue screen after Ko 2840149, error - "STOP: c0000218 {Registry hive failure} the registry cannot load the hive (file): \systemroot\system32\config\SOFTWARE.

    After I installed security KB2840149 on a 2008 VM w/exchange server that is running on the machine of Hyper-v server 2008 I'm dead in the water w / E-mail down hard.  The virtual computer is in a reboot cycle bluescreening before I can get anywhere.  Tried the last well known - no effect.  Safe mode - so bluescreens.

    BlueScreen info:
    STOP: c0000218 {Registry hive failure}
    The registry cannot load the hive (file):
    \systemroot\system32\config\SOFTWARE
    or its log or alternation.
    It is damaged, missing, or not accessible in writing
    I saw that it was a patch of replacement for a patch that crashed a lot of PCs.  Since there is no history on this patch, I wanted to check in a see what is the best way to fix this on a virtual machine?

    Being not so deep on VM, I wasn't sure if there was a better way. But I just put the virtual machine to load 2008 iso and then made the standard repair for registry problems off the coast of the article below.

    Of http:

    If the Windows registry is slightly or moderately damaged, you may be able to restart the computer in safe mode and use system restore to restore the registry from the computer to the last known good configuration. However, if the Windows registry is seriously damaged, all types of logon will be prevented. Trying to connect to Windows causes the system fails, then restart. In this case, you will need to boot the system into the recovery instead of Windows Console. Once in the Recovery Console, you can use the Startup Repair tool. Startup Repair tool automates common diagnostic and repair of the installations of Windows tasks starts longer.

    (a) start your Windows Vista or Windows Server 2008 DVD
    (b) on the first Setup screen click Next
    (c) in the lower left corner of the screen, choose "repair your computer".
    (d) on the System Recovery Options screen, select your Windows installation and then click Next
    (e) click on "Command prompt".
    (f) go to X:\sources\recovery > startrep.exe
    (g) this will take some time but will look at any registry related issues.

  • corrupted: WINDOWS\ SYSTEM32\ CONFIG\ SOFTWARE Stop: c0000218 {Registry file failure} the registry cannot load the hive (file): SystemRoo

    corrupt: WINDOWS- SYSTEM32- CONFIG- SOFTWARE Stop: c0000218 { file registry failure} the registry cannot load the hive (file): any on windows server 2003.  How can I fix this

    Hello, getin99

    For help on Windows Server, you need to create a new post on the TechNet forums at the following address: http://social.technet.microsoft.com/Forums/en-US/winservergen/threads

  • Trying to access Windows XP on a Mac, receive stop error. failure of a file registry c000218 registry cannot load the hive (file)

    I have a Mac OSX, leopard, parallel 5 and Windows xp.   When I try to access Windows, either through boot camp or at the same time, I get the error message "stop. failure of a file registry c000218 registry cannot load the hive (file).  I bought Windows 7 but cannot get Windows Installer.

    The hard drive may be replaced . Or something is not compatible

  • Windows media player cannot find the wmv file

    Windows media player cannot find the wmv file when it is attached to the email, but can't once downloaded to the desktop

    See if the steps described in this discussion help http://www.pcreview.co.uk/forums/showpost.php?p=7806298&postcount=3 Steve Hebert - MVP Microsoft, Internet Explorer

  • Windows Media Player cannot play the protected file. The player has detected that the connection to your hardware might not be sure

    I just bought the New Avengers movie with the digital copy. I moved it and now I can't watch it. I have "Windows Media Player cannot play the protected file. Drive detected that the connection to your hardware may not be safe. "when I click it. What now?

    Hi Jason,

    Thanks for asking this question to Microsoft Community.  I'll try and help you resolve the problem; However, I will need to ask you a few questions.

    Are you able to play other movies without any problem? Have you done a recent software or changes to the material on the computer?

    Here is a link with some good steps. Go through it and check if it helps. Also check out this article and see if it helps.

    Also, see the steps in the article and see if it helps.

    Hope this helps and let us know if you need more assistance. We will be happy to help you.

  • PC Windows 7 64 Player update. Error 2: The system cannot find the specified file

    Impossible to update Adobe Reader on PC under Windows 7 Home Premium 64 & Mozilla Firefox. Error 2: The system cannot find the specified file.

    I tried several times, now my v9.4.1 player is not supported.

    1. Uninstall Reader 9.x
    2. install the latest version of the reader to http://get.adobe.com/reader/enterprise/
  • Stop: 0xc0000218 {registry file failure} the registry cannot load the hive (file): \SystemRoot\System32\Config\Software is damaged, missing, or not accessible in writing.

    Original title: blue screen.

    My computer won't start even in safe mode... c000218 (failure of a registry file)

    Cannot load the hive (file): \systemroot\system32\config\SOFTWARE is damaged, missing, or not accessible in writing

    Hi rookiegeek,

    You did it of any material changes or software on the machine prior to this problem?

    The three possible causes of the problem are:

    (a) failure.

    corruption of file b) & defective hardware.

    (c) the problem can occur on shutdown.

    You can follow this link & check if the problem persists.

    Registry troubleshooting steps for advanced users

    Hope the helps of information. Please post back and we do know.

    Concerning
    Joel S
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Setup error "the system cannot find the specified file" (hpzprl40.exe)

    Trying to install HP Photosmart c5180 all-in-one using the latest version of the software download at HP and have Windows 7 Asus desktop computer. Receive error install "the system cannot find the specified file" (hpzprl40.exe), and the wizard stops.  Help, please.

    Hi loveisus,

    Try using the brush included in the CD or download. Let me know what you find?

    Of the Original installation CD:

    1. Insert the CD in the drive and then cancel Setup

    2. open my computer and click right then on the CD from the drive and select open

    3 open the Util folder

    4 open the CCC folder

    5. run the uninstall_L4 (exe or Bat)

    6. once the uninstall is complete, restart the computer

    7 run the Accessories\ System Tools Disk Cleanup

    8. download and install the latest version of Adobe flash player

    http://www.Adobe.com/support/flashplayer/downloads.html

    9 download drivers and full software features

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=MP-76232-1 & CC = US & DLC = in & LC = on & os = 4063 & Product = 1153481 & sw_lang=.

    10. run the download to reinstall the printer

    If the software has been downloaded and extracted to your system:

    1. type % temp % in the field of race

    2. Locate and open the folder starting with 7z (example: 7zS2356)

    3 open the Util folder

    4 open the CCC folder

    5. run the uninstall_L4 (exe or Bat)

    6. once the uninstall is complete, restart the computer

    7 run the Accessories\ System Tools Disk Cleanup

    8. download and install the latest version of Adobe flash player

    http://www.Adobe.com/support/flashplayer/downloads.html

    9 download drivers and full software features

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=MP-76232-1 & CC = US & DLC = in & LC = on & os = 4063 & Product = 1153481 & sw_lang=.

    10. run the download to reinstall the printer

  • C0000218 {registry file failure} the regestry cannot load the hive (file)

    I have XP pro. on a Dell computer. Think that children may have picked up a few difficulties. When trying to boot into safe mode, I get "Stop: c0000218 {Registry file honor} the regestry cannot load the hive (file): \SystemRoot\System32\Config\Software or its log or replacing." It is damaged, missing, or not accessible in writing. »

    There is no disk that came with it, but I have anouther computer with the same windows. I tried to find a way to make a BOOT disk but cannot find a way. Is there a way to solve this problem with the windows disc?

    It's a pretty popular mistake these days and sometimes easy to get running, but you also want to figure out how it happened.  I always suspect Symantec/Norton products with this error, but we'll see.

    If you currently or have already had a whole isntalled Symantec/Norton products, what are the names and versions (if you know).

    Other variants are:

    STOP: c0000218 {Registry file failure}
    The registry cannot load the hive (file): \SystemRoot\System32\Config\SECURITY or its log or replacing. It is damaged, missing, or not accessible in writing.

    STOP: c0000218 {Registry file failure}
    The registry cannot load the hive (file): \SystemRoot\System32\Config\SOFTWARE or its log or replacing. It is damaged, missing, or not accessible in writing.

    STOP: c0000218 {Registry file failure}
    The registry cannot load the hive (file): \SystemRoot\System32\Config\SYSTEM or its log or replacing. It is damaged, missing, or not accessible in writing.

    I would start with a chkdsk/r since the recovery CD of Console you make (see below) and please answer a few questions...

    Maybe someday the dialog box 'ask a question' forums XP will ask these questions automatically when a new thread is started so I don't have to ask every time.  It might even be possible to solve a problem in a single response when enough information is provided.

    Please provide additional information on your system:

    Describe your current antivirus and software anti malware situation: McAfee, Symantec, Norton, Spybot, AVG, Avira!, MSE, Panda, Trend Micro, CA, Defender, ZoneAlarm, PC Tools, Comodo, etc..

    The question was preceded by a loss of power, aborted reboot or abnormal termination?  (this includes the plug pulling, buttons power, remove the battery, etc.)

    The afflicted system has a CD/DVD drive work?

    You have a true bootable XP installation CD (it is not the same as any recovery CD provided with your system)?

    Fill in the blank: my system was working fine until this happened: _.

    If the system works, what do you think might have changed since the last time it did not work properly?

    If you have no XP bootable media (or aren't sure you have) create a bootable XP Recovery CD of Console and do not forget.

    This is not the same as recovery disks that may have come to a store to purchase the system.

    You can make a bootable Recovery Console CD by downloading an ISO file and burn it to a CD.

    The ISO bootable image file you need to download is called:

    xp_rec_con. ISO

    Download the ISO from here:

    http://www.mediafire.com/?ueyyzfymmig

    Use a new CD and this simple and free program to burn your ISO file and create your bootable CD:

    http://www.ImgBurn.com/

    Here are some instructions for ImgBurn:

    http://Forum.ImgBurn.com/index.php?showtopic=61

    It would be a good idea to test your bootable CD on a computer running.

    You may need to adjust the computer BIOS settings to use the CD-ROM drive as the first device to boot instead of the hard drive.  These adjustments are made before Windows tries to load.  If you miss it, you will need to restart the system again.

    When you start on the CD, follow the instructions:

    Press any key to boot from CD...

    Installing Windows... going to pronounce.

    Press 'R' to enter the Recovery Console.

    Select the installation that you want to access (usually 1: C:\WINDOWS)

    You may be asked to enter the password (usually empty).

    You should be in the folder C:\WINDOWS.  It's the same as the

    C:\Windows folder that you see in Solution Explorer.

    The Recovery Console allows base as file commands: copy, rename, replace, delete, chkdsk, fixboot, fixmbr, cd, etc.

    For a list of the commands in the Recovery Console, type help at the prompt of commands or read on here XP Recovery Console:

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/recovery_console_cmds.mspx?mfr=true

    A good idea before you start things must first verify the integrity of your file system by using the chkdsk command.

    In the command prompt window, run the chkdsk command on the drive where Windows is installed to try to fix any problems on the afflicted player.

    Running chkdsk is fine, even if he finds no problem.  It won't hurt anything to run it.

    Assuming your boot drive is C, run the following command:

    CHKDSK C: /r

    Let chkdsk finish to correct the problems, he could find.

    It may take a long time for chkdsk complete or they seem to be "stuck".  Be patient.  If the HARD drive led blinks always, chkdsk is something.  Keep an eye on the amount of the percentage to be sure that it is still making progress.  It may even seem to go back sometime.

    You must run chkdsk/r again until it finds no error to correct.

    Remove the CD, and then type "exit" to exit the RC and restart the computer.

    You have not to set the BIOS to boot the disk HARD since the CD won't be.

    Do, or do not. There is no test.

    I decided to implement the points for a new puppy instead of a pony!

  • Receive error message: the system cannot find the specified file. C:\Windows\System32\ < LANG_NAME > \mstsc.exe.MUI when I try to use remote desktop.

    Remote Desktop error

    I use Vista Home Premium.  I used to be able to use the remote desktop connection application, but all of a sudden, it stopped working.  When I try to run it I get this message:
    _________________
    The system cannot find the specified file.

    C:\Windows\System32\\mstsc.exe.MUI
    _________________

    Does anyone have a solution to this problem?  I do not have this file into C:\Windows\System32\en-US\... but perhaps it was corrupted somehow?

    Please help me.  Thanks in advance.

    Hello

    It seems that there are a few system files that have trouble.  One of them being mstsc.exe, I wish you find spyware or infection by the virus first, before you try the next step.  Please see the sticky thread in the security forum.  MVP offers some good advice how to remove these problems.

    http://social.answers.Microsoft.com/forums/en-us/vistasecurity/thread/fa30853d-719a-4265-9e7b-9287567d31e3

    If everything is clean, we will try a repair installation to replace the problem files and also to ensure that other system files are good.

    The 'repair' installation (upgrade on-site) will not affect your installed programs or data.  Just make sure that you are already connected to your computer when you start the installation.  Do not boot from the DVD.

    If the installation does not start automatically when you insert the DVD, run setup.exe from your DVD player.

    • When the Setup program starts and the install now screen, click install now.
    • Note When you receive the important Get updates for installation message, click go online.
    • Click upgrade when the which type of installation you want? appears

    Please let us know if this solves the problem for you.

    Brent
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Cannot delete files from 0 KB Word 2003 "cannot read the source file or disk.

    Original title: how remove the files from Word 2003 0 Kb which can not be read - file cleaner empty and an empty folder solvent do not work - "cannot read the source file or disc!

    I have a number of Word 2003 files that I'm unable to delete, since the message "Source file can not be read"appears when I try to delete.
    I have tried vacuum cleaner and Remover empty folder, also delete - file but cannot delete what cannot be recognized. Can anyone help please? Must be an easy way to do what I forgot, because I can't send files that contain some of these bulk files in my backup hard drive, the process stops when it reaches the 0 kb file!

    Hello

    1. where are the files located?
    2. are you able to open this file?

    This can happen if the file is used by some programs / demand or is corrupt.

    Follow these steps:

    Method 1: Check if you are able to delete the files in safe mode.
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/boot_failsafe.mspx?mfr=true

    Method 2: Ownership of files and check if you are able to delete.
     http://support.Microsoft.com/kb/308421

  • The following error occurred while importing IMG_ #. JPG: The system cannot find the specified file.

    It really starts to annoy me. For some reason, Windows does not allow me to import my photos with Windows more, I was able to import pictures all the time, but all of a sudden it stopped. I tried the import with the program auto-importation of Windows and then I tried to use the import software called Windows Live Gallery. Both gave me the same error message "the following error occurred while importing IMG_ #.» JPG: The system cannot find the specified file. "I tried looking up this error on many sites and have not led to what. I tried to re-formating my memory card but it did not work. Please help me, I can not import all the images and is running out of memory cards, I don't want to delete the images I took because I can not import to my computer.

    Thank you.

    Hello
     
    1. you try to import these images on the camera?
    2. have you checked if the image files are present on the device?
     
    First cross check if the photos are present on the device and if you are importing from the right location. Try to copy the files manually and paste it on the desktop and see if it works.
     
    For more information on troubleshooting camera connection problems, visit this link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/Troubleshoot-camera-connection-problems
     
    Post back with the results, so that we can help you better.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.

  • BCDedit - the system cannot find the specified file?

    Hello

    When I type the BCDedit command in the prompt with elevated privileges (Administrator), this error pops up: "the boot configuration data store could not be opened. The system cannot find the specified file. "However, if I restart, press F8 and go into recovery options and run the recovery options command line BCDedit command I get the appropriate list of BCDedit.
    How can I fix?

    I made an account just for this post, as I struggled to understand myself that I tried to re - enable Data Execution Prevention.

    Instead of simply type bcdedit, you tell the computer where to look.

    Run cmd.exe as administrator.

    Then type:

    /store c:\Boot\BCD bcdedit

    This will give you a list of options.

    For example, suppose you want to turn on DEP after having stopped it.

    You would type the following:

    bcdedit/store c:\Boot\BCD/set nx AlwaysOn

  • Error: The system cannot find the specified file (0 x 80070002), when you perform the backup of Windows.

    Original title: missing for InputPersonalization file

    I used the Windows 7 backup utility for several years and recently it has begun to generate the following error:

    Backup has encountered a problem during backup of the C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\InputPersonalization file. Error: (the system cannot find the specified file. (0 x 80070002)

    I checked with Windows Explorer and confirmed that this file does not exist in this way. Instead, the file exists in the path under my local account.

    How can I stop this error? In addition to a clean backup, I like to keep the overall system as clean as possible.

    Hi Jeff,

    Thanks for joining us.

    Please visit the following link to resolve this problem:

    0x8100002F error code and or error code 0 x 80070002 when you back up files in Windows 7
    http://support.Microsoft.com/kb/979281/en-AU

    Scenario 1 is similar to the issue that you are facing. However, you can also try the steps outlined in the other scenarios and see if the problem is resolved.

    Please, try the steps and get back to us with the State of the question.

Maybe you are looking for