He can get wav to play from the SD card in the sim

For some reason any my .wav will play only a simulated SDCard but not where I stored it in the res folder.

It works

______________

public void playSound().

try {

String filename = "file:///SDCard/Blackberry/tink.wav";

A player = javax.microedition.media.Manager.createPlayer (filename);

Player.Start ();

} catch (IOException e) {}

System.out.println ("error creating player");

} catch (MediaException e) {}

System.out.println ("error media type");

}

}

public Sub fieldChanged (field field, int context) {}

if (field is filing) {

playSound();

_animatorThread = new AnimatorThread (this);

_animatorThread.start ();

}

If I replace the file name with "com/app/res/tink.wav" it doesn't work. My Kit is com.app.res.

Try this

 InputStream is = getClass().getResourceAsStream("tink.wav");
 //create an instance of the player from the InputStream
 Player player = Manager.createPlayer(is, "audio/wav");

Tags: BlackBerry Developers

Similar Questions

  • Registry files have been deleted via a Norton 360 3.0 registry clean up - can't get an ip address from the router

    I'm running Vista Ultimate, -connection (Ethernet) with Verizon FIOS I ran a Norton registry clean and foolishly trust what he says to remove.

    At first, all of my USB cards have been screwed up (noted in the Device Manager with exclamation next to each one points)
    I did a system restore and that corrects this problem, but now I'm having a problem with my network card.
    , All diagnostic tests, etc. show that the material is very good. My router is also fine the problem is that windows can't get an IP address from the router and then assigns his own
    (a # 169 instead of a # 192)
    In the network connection properties, it says that the device is functioning correctly, and the driver is up-to-date.
    'Connection speed' tab: a window of diagnosstics is: I ran testto test adapters connect to connect to the network.
    Results: connection Test
    Test details:

    I have "this card is configured to obtain an IP address automatically. No DHCP server is present on the network. Windows selected an IP address by using the alternative private IP addressing. »

    X "Ping 0.0.0.0 Gateway: failure.
    !  "No DNS server is available for this connection.
    ! "No WINS server is available for this computer.
    X "Ping 0.0.0.0 network: failure.
    ------------------- -------------------------------------------------------------------------------------------------------------
    In this same window of diagnostics under the "LinksTab".
    Link current test status: (what is determine the current connection speed of the adapter and link partner)
    Results:
    ! The adapter is configured to negotiate the speed with the link partner, but 1000 Mbps was chosen as one of the possible speeds.

    The best link options-results of the speed test:
    ! Could not detect way reliable speed and duplex settings. Possible speed/duplex settings are 100 Mbps Full Duplex and Half Duplex 100.
    (Note that these link tests are online and I can't online)

    Also in the Diagnostics window-under the 'Cable' link cable - past-polarity is normal.
    Depending on the tab is the Hardware tab
    Hardware diagnostics check for I/O conflicts...
    Results: all the tests:
    EEPROM test
    FIFO test
    Test register
    Interruption of the tests
    Loopback test

    I also went in the prompt type in IPCONFIG... c which shows:
    Ethernet connection to the Local network card:
    ConnectionSpecific DNS suffix: (it's completely empty here)
    Link-local IPv6 address: fe80::bda9:951 d: 619f:a0dc 9%
    Autoconfiguration IPv4 address: 169.254.160.220
    Subnet mask: 255.255.0.0
    Default Gateway: 0.0.0.0

    I also have a sort of ping command here-cant remember the command, but the results were in the CBS... I didn't know how to reach. He however escape from something on the registry files.

    I went throughD-Link Tech router (router) support is good, Fios Tech support everything set up right, - Norton support(Norton denies that the files were not to be touched-although their report shows these registry files were deleted)-Dell Tech support because my warranty missed 3 weeks ago - although I still have the "your Tech Support team until 2013 - which is valid only if you have a hardware warranty-made no sense sold me the car without. the engine - directed the FTC to bring a complaint about it - after I get this fixed number.

    I hope someone can help... by the way I get perfectly in line with my laptop - I know this isn't my router. I'm sure it's due to some registry files being moved-(j'ai eu deles de messages d'erreur indiquant que les fichiers de Registre ont été endommagées ou manquantes) what do I do now? No system restore to restore this part of the register - I also installed the drivers from the dell drivers and Utilities disc - but maybe I've done that correctly? I put the disc - extract files-(he says they have been unpacked) was a new step for me to do after that? Help, please!
    Thank you!

    Hello
     
    We recommend that you install the router (see its manual) and the pilot of NIC once more and check the difference. In the first post, you mentioned that you decompressed or extracted files. Once the files are extracted, you will be asked to install the driver. However if you do not receive any prompts for the driver, then you will need to locate the destination folder where the files are checked to find the configuration file.

    Open the destination folder where the files are extracted and run the Setup file to complete the installation.
     
    To download and install the latest network card driver, visit the site Web of the manufacturer of the device or system.
     
     
    I hope this helps.
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • The windows of the bar of Windows are already a form of tabs, so I need them in Firefox. How can I turn off completely from the 23 of Firefox?

    RE: TABS ARE WINDOWS!
    The windows bar already functions as a tab bar. These tabs are called "windows". So, I find windows superfluous Firefox tab. How can I turn off completely from the 23 of Firefox? I don't need to what are essentially the bars of TWO Windows covering the entire width of the image of my screen! I already have a Windows bar at the bottom of my screen, and if I really wanted to, I could change ITS position towards the top of the screen, so that it would LOOK at the windows of Firefox tabs bar. Firefox TABS are, essentially, a SECOND bar Windows superfluous.

    Here are my reasons why I prefer to use Mozilla's Firefox, Microsoft Internet Explorer or Google Chrome. I love and admire Firefox intended to Mozilla on good security for Personas Firefox Add-on and for free use of Firefox in the Add on Ad-Block, which, as you know, has the merit of separate to reduce the size of the screen - the last is my reason for wanting to get rid of "windows" Firefox SUPERFLUOUS tabs bar. I'm terribly sick companies forcing bars (most representative of marketing campaigns, trying to sell me something) in my browser (and in my throat) whenever I download something. (In case you haven't guessed, I have deliberately talking about your bar of Firefox tabs as a '' windows' tabs Firefox bar', because the TABS are WINDOWS!)

    You can also have an addon to open new tabs in a new window.

  • I would like to have at least 1 of my toolbars that are displayed at the bottom of my browser open screen. How can I move a toolbar from the top to the bottom of the page?

    I would like to have at least one of my toolbars that are displayed at the BOTTOM of my browser open screen. How can I move a toolbar from the top to the bottom of the page? I don't want to do this by using an extension, and when I read about the extension, I really have not seen how it would move the toolbar to the top-down any browser page open.
    Thanks in advance for the supply, the answer and the procedure to get this accomplished.

    You can't drag an entire toolbar to the bottom of the window. The Bar of the Addon is a "toolbar", drag whatever you want from the Palette to customize or a toolbar up to the bar of the Addon.

  • How can I remove a photo from the album Selfies?

    How can I remove a photo from the album Selfies in iOS 9 Photos on the iPhone 6 s?

    I understand that you can not get rid of the album Selfies (disappointment), but I'm very frustrated that you can't delete even a single image in the folder!

    Delete sound time.  Who will release the album Selfie.

  • I can't add a component from the Add Remove program window as says could not initialize winxp

    I can't add a component from the Add Remove program window as says could not initialize winxp

    My victory is xp professional ver 2002 service pack 3

    It's usually easy to fix, but if you removed all the dll and inf files, you can have a bunch of other problems that you have not yet discovered.

    If you mean when you try to use Add/Remove Windows components you see a message like this:

    Install was not able to load the master file.
    The application could not be initialized.

    This happens because this file is missing:

    c:\windows\inf\sysoc.inf

    There is no copy backup of this file on your system and run the System File Checker will not replace the missing file (sorry, that Microsoft committed Support Engineer 'experts').

    You will need to get a real copy of your XP bootable installation CD or from a reliable source.

    There's a copy on my SkyDrive, you can download - here's how:

    I downloaded a copy of XP Pro SP3 file you need on my SkyDrive (everyone has a SkyDrive for file sharing).

    You can download it and when you do, put a copy of the file in this folder (assuming that Windows is installed on your C drive):

    c:\Windows\Inf

    Here is the link to my SkyDrive and you can get the file you need here:

    https://SkyDrive.live.com/?CID=6a7e789cab1d6f39&ID=6A7E789CAB1D6F39! 311

    When you see the files available for download, you can not see the file extension (.exe, .dll, .cpl, .sys, .zip, etc.), but when download you them they will have the right extension.

    When you download the file (especially if you use Internet Explorer), when you get a chance to save the file, your browser is unable to save the file with an extension (by example, .exe, .dll, .cpl, .sys, .zip, etc) then you will need to manually add the extension appropriate to the file when you download the file before you save it.

    You can download the file without the extension, and then rename the file to add the appropriate extension.  You do not want to use a file named sysoc when the name of the file should really be called sysoc.inf (if the downloaded file has no extension, you will need to change the name of the file to add the appropriate extension to make it work.

    You must then copy and paste the downloaded folder appropriate on your system.

  • Cannot print and get an error message from the printer saying to close the scanner cover

    Original title: I can't seem to print on my Epson Workforce 845.

    I can't print from my computer running Windows 7 Home. I get an error message from the printer telling me to close the scanner cover. I can print without problem of my computer running Windows 7 Enterprise.

    Hello

    (1) is your computer connected to a network?

    (2) did you of recent changes to the computer before the show?

    (3) what is the exact error message?

    You can run the troubleshooter printer on the computer that faces the question and check if it solves.

    Open the printer Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    You can also consult the following articles and check if it helps to solve the problem.

    Printer in Windows problems: http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    Install a printer: http://Windows.Microsoft.com/en-us/Windows7/install-a-printer

    For any further assistance, I'd contact Epson printer manufacture support.

    Here is the link: http://www.Epson.com/cgi-bin/store/support/supDetail.jsp?BV_UseBVCookie=Yes&OID=184583&infoType=overview

  • How to get audio to play on the timeline by rubbing through

    How to get audio to play on the timeline during the treatment, the clip is not cut, clip does not display an audio wave, looked through the help did not answer. When the clip is imported without options rise so uncertain where the issue is, any help is greatly appreciated, ty

    There is an option in the Preferences / Audio: audio playback while rubbing.

  • How to make sure the Animation still plays from the beginning

    Hi guys,.

    I'm working on a project to facilitate dashboard which consists of 3 animations. I have a problem when I navigate between each symbol, without allowing that each completed in full animation. Rather than play as they should, from the beginning of each animation, animation simply continues to play from the position as was the timeline when I navigated away to another symbol.


    Is it possible that I can reset the symbol in its original position, when I trigger another animation to make sure that each animation always time from the beginning?

    Has anyone else had a similar problem? Any help will be much appreciated as always.

    Thank you very much


    Ross

    All included now - it works, and you do not have the script fixed correctly.

    The only thing I noticed is the placement of you reading action, see capture.

    I didn't move a bit. And by that I mean set it so that the beginning of the fall of play icon AFTER the reading, the alignment exactly where the label of separation begins - see figure.

    In your case it was not aligned correctly. I also changed the read option play to play to 0:00.

    HTH

    Darrell

  • How can I transfer a file from the operating system to a backup of the production running VM virtual machine?

    Problem:  After I do a backup one using ghettoVCB on a local VMFS volume, I have a virtual machine that I can start something happened to that running.  However, sometimes I just need a file from the OS level, which means that I would need to start to get them, but then I have an IP address conflict.  I can't imagine a way to have the NICs turned off and still be able to move the file.  If I change the IP addresses, the software that I need to create the file that I need to transfer no longer works because, although there no need of constant connectivity to the seller, it is locked to the public IP address.http://communities.vmware.com/images/emoticons/sad.gif

    Material:  I have two 4 ESXi hosts to work, each with local VMFS volumes.  They share a private vlan common and a vlan common public.  They each ssh, ftp, wput, wget, and rsync available.  I have a Windows 2003 Server VM which also hosts a NFS and the VI client and other VMWare tools.  It also has private and public interfaces as do virtual machines that would be to make and receive the OS files.

    Question:  How can I transfer a file from the operating system to a backup of the production running VM virtual machine?

    Thank you!

    Yes Mr President, make sure you set the network on this virtual machine to be connected to the 'Internal' vswitch, you set up before turning the power on to the virtual machine.

    -

  • Can I retrieve text messages from the phone memory?

    Can I retrieve text messages from the phone memory? I read that it is possible via iTunes and third party programs. It is of course possible, can what third-party program you recommend? (because I have no backup in iTunes)? I need to backup this message, because I have to use this evidence in court...  I have Iphone 4 and iOS 7.1

    Bardyt wrote:

    Can I retrieve text messages from the phone memory? I read that it is possible via iTunes and third party programs. It is of course possible, can what third-party program you recommend? (because I have no backup in iTunes)? I need to backup this message, because I have to use this evidence in court...  I have Iphone 4 and iOS 7.1

    The only way to recover data from your phone is if you have backup icloud or iTunes.

    If you have not made a backup, then sorry that data has disappeared.

    you suggest that to start your backup device.

    The backup of your iPhone, iPad and iPod touch - Apple Support

  • How can I remove an application from the App Store in the section update application?

    How can I remove an application from the App Store in the section update application?

    You can not delete Apps from the update tab. It's just a list

    The list is just for information purposes. Finally, they are deleted from the list on their own.

  • You just edit Contacts in GMAIL and I can not restore my contacts from the previous version. I followed your instructions, but it has not restored nearly 500

    You just edit Contacts in GMAIL and I can not restore my contacts from the previous version. I followed your instructions, but it has not restored nearly 500 contacts that I have that are in other contacts.

    Hi robertsjohn125,
    Contacts are not supported in Firefox, unless you take on Firefox Desktop and Hello of Firefox?

    Where to manage your contacts, this might help to direct you to the correct support.

  • How can I delete a message from the community of apple support

    How can I delete a message from the community of apple support

    You can not

    Why do you want?

  • How can I remove my name from the top right of the screen. I have a 2015 13 "MacBook Pro running 10.11.4

    How can I remove my name from the top right of the screen. I have a 2015 13 "MacBook Pro running 10.11.4

    At the top right of the menu bar shows the current user who is logged in and allows quick change of user accounts.

    You can disable the display of menu bar in system preferences > users and groups. Or order just drag it out of the bar.

Maybe you are looking for