Add audio to Dialog.alerts

Good evening

Can some give me some guidance how to add sound or make the phone vibrates when the dialog.alert is the trigger. Also any reference to create a user to configure alerts that aduble, (use the audio files on the BB)

Hello

You can then:

    public void playOnAlert()
    {
        Alert.startAudio(TUNE, Alert.getVolume());
        Alert.startBuzzer(TUNE, Alert.getVolume());
    }

    public void vibrateOnAlert()
    {
        Alert.startVibrate(3000);
    }

    public void flashLightOnAlert()
    {
        LED.setState(LED.STATE_BLINKING);
        LED.setConfiguration(100, 1000, LED.BRIGHTNESS_100);
    }

    public void stopSound()
    {
        Alert.stopAudio();
        Alert.stopBuzzer();
        Alert.stopVibrate();

        LED.setState(LED.STATE_OFF);
    }

You can also use player MMAPI for playing a melody on the alert (do not forget to close correct).

Tags: BlackBerry Developers

Similar Questions

  • Click button to see the Dialog.Alert

    Hello, I'm new to the development of Blackberry and I can't get a SIMPLE dialogue. Alert show on click of a button.  Talk about programming most frustrating I've ever done.  If someone could help me please I would appreciate it a lot!

    ButtonField btnCalc = new ButtonField ("Calculate", ButtonField.FIELD_LEFT |) ButtonField.CONSUME_CLICK);
    btnCalc.setPadding (0, 0, 0, 4);

    FieldChangeListener customListener = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    Dialog.Alert ("Hello");

    }
    };

    btnCalc.setChangeListener (customListener);

    Hello

    class pk extends MainScreen
    {
    pk()
    {
    
        ButtonField btnCalc = new ButtonField("Calculate", ButtonField.FIELD_LEFT | ButtonField.CONSUME_CLICK);
        btnCalc.setPadding(0, 0, 0, 4);
    
        FieldChangeListener customListener = new FieldChangeListener() {
        public void fieldChanged(Field field, int context) {
        Dialog.alert("Hello Pawan");
        }
        };
    
        btnCalc.setChangeListener(customListener);
         add(btnCalc);
    }
    }
    

    Its fine workying. I test. When you click the button, you will get Dialog.alert.

    Thank you
    Pawan

  • Add audio does not work

    When I try to add audio, either I get an alert 'lack Bo' or nothing happens and the audio is not added (in the first clip). Audio "clip Prime Minister themes" works, but I cannot add anything to my music library.

    Hey guys,.

    We just released a new version of Adobe Clip. Could you please try with the 2.0.3 Version.

    Thank you.

  • How to record the screen and add audio with QuickTime?

    I can't wait to make my first video through QuickTime player, but I'm stuck on the following:

    (1) new screen recording - I'm able to capture the process of my video with this feature

    (2) audio new recovery - separately, I can record my audio

    But can't do the task above at the same time which means that I can save the process through and add my voice at once? Is this possible?

    Hello Vishal2014,

    I understand you are trying to create videos with recordings of screen as well as a voiceover. I can help you with that.

    Now, when you set up your registration form, you have the option to choose a microphone to talk and create video at the same time. This would reduce you adding the clip after the fact. Take a look at the first link below that will go on the way to do this.

    Save your screen
    https://help.Apple.com/QuickTimePlayerX/Mac/10.11/index.html?localePath=en.lproj #/ qtp97b08e666

    Now if you want to add audio to the video that you already created, consider using iMovie. You can import video, and during playback, you can save your audio files on top of the video. Take a look at the following article for more details on how to achieve this.

    iMovie (2013): add audio and music
    https://support.Apple.com/kb/PH14708

    Take care

  • Dialog.Alert () cannot display in implements method

    class DialogCommandHandler extends CommandHandler
    {
        public void execute(ReadOnlyCommandMetadata metadata, Object context)
        {
            if (context.equals(contextSearch)) {
                Dialog.alert("Coming soon!");
            }
        }
    }
    

    Hi, everyone, I found this problem while I'm my debugger application, execution implements net.rim.device.api.command.CommandHandler.execute, in that implements Dialog.alert () cannot display my warning, I've tried with/without synchronized invokeAndWait() and invokeLater() (Application.getEventLock ()) {}, each of them did not work properly, is there a solution for this problem, or is it a question? Thank you! ~

    Can you describe what is happening?  There is an exception thrown?  Or the treatment stops right?

    In this case, I think the correct 'packaging' for this, is an invokeLater.  I think that the other options will cause a blockage.  So, your code will be something like:

    If (context.equals (contextSearch)) {}

    UiApplication.getUiApplication.invokeLater (new Runnable() {}

    public void run() {}

    Dialog.Alert ("Coming soon!");

    }

    });
    }

  • Dialog.Alert give runtime exception

    Hi all

    I have a scenario, whiich am thrown in runtime exceptions.

    I placed a dialog.alert to show the user an alert after a validation. It works fine, but once when I cllicked on the ok button, it TR throwing a runtime exception. She did not understand why clicking on the alert of dialogue in which run-time exception.

    In some screens, he of not throwing the error and works very well.  I have observed that, the error is thrown in cases where a custom editfield is added to the screen.

    Please explain to me why this is happening and how to understand it. .?

    Thanks to everyone for your interest!

    After a long vacation... so this thread remains as it is. I found the mistake during debugging. There is no detailed msg that are associated with. and it is originally due to "TouchEventInjector" will be void. I haven't heard of him until now.

    I don't know yet why it start error.

    but I solved my problem by pushing an anti-pop as alert msg.  I wl mrk this thread as solved after awhile, looking for ideas about this error.

  • Dialog.Alert () and discussions seem to collide.

    Whenever I start a new thread in the main program, it works fine until I just change a few numbers, or output to sysout. Whenevery I use a Dialog.alert from a thread, I receive a RuntimeException.

    I tried from the main class as an argument to the thread, and then leave the thread executing a mainclass.displayPopup () custom; function popups the but he still doesn't have with a runtimeException

    I do not understand the use of Threads? I want a Dialog.alert () at 3 seconds after the screen apear as soon as the screen that contains the main code is pushed...

    To start a separate Thread, you use start:

    This.qdist.Start ();

    If you are using

    This.qdist.Run ();

    then you ask just the run method on your own Thread.

  • Convert Dialog.alert to handle the touch event

    Anyone know how I can convert my dialog.alert to handle the touch event

    Please help me = D

    You don't need - if you use the standard RIM dialogue he class shoud touch event itself.

  • Displaying a Dialog.alert once a thread has ended?

    I'm having some problems with this and then I just a thread that makes treatment and after treatment is finished I want to inform the user with a simple Dialog.alert that has finished processing.

    Thread MyThread = new Thread();
    thread. Start();

    Dialog.Alert ("files have been processed!");

    Of course if I do this, the dialog box is in place until treatment is completed. I can get this work done a thread.join () but I said that I should avoid this.

    "I get a lock event in the thread at the end, I'm doing an anti-pop"

    I would recommend not getting the lock of the event.  Use invokeLater where you can, invokeAndWait when you need to wait and get the event only lock where you know it will work.  In this case, you must put the pop filter and the dialog in a Runnable invokeLater.  This will work.  You have discovered, dialogue and event lock do not work together.

    Regardless, I would recommend using the model of the observer.  Your background Thread should not have to know anything abut the UI components.

  • Cancel button on Dialog.alert)

    Hello

    Im very new program Black Berry and I was wondering if someone could help me.  I have an application that sends a message--(GoodBye!) when the user closes the it.  I could put a Cancel button in this menu also to cancel the closing of the application?

    Here's what I have.

    public boolean onClose()
        {
    
            Dialog.alert("Goodbye!");
    
            System.exit(0);
            return true;
        }
    

    Thank you

    Scientist

    This topic can help you.

    http://goo.GL/80dP

  • Add audio to 8 Captivate

    Hello world

    Wanted to ask what are the general approaches of the people to the add audio to 8 Captivate?

    I think it's quite long and counterproductive to add a voiceover full record for an entire project and divide by the slide markers. Captivate only really seems like you're doing this 'once', as when you save, all lengths of slides are changed to the length of the audio.

    The best way I found is to edit and export clips in Adobe Audition, and then import them on a slide-by-slide basis. Even if this is a bit problematic if you have audio to extend across multiple slides in a software simulation.

    Thanks in advance for your comments,

    Ben

    Hi Ben,

    I prefer to save in hearing myself (control freak), but will also create separate audio clips, one for each slide. I'll import to library, then drag each of them to the slide in the case of slide audio. Good labelling helps a lot.

  • Is it possible to add audio keyframes to a source clip in the source monitor?

    Hello, is it possible to add audio keyframes to a source clip in the source monitor? (Not the chronology)

    I would like to dive and pre selectively switch off at the source-clip in the trash.

    Bonus round... are waveforms audio visual available somewhere in the source monitor Panel?

    Perhaps with a thread of keyframe-able?

    Thank you very much

    You can not key frames in the source monitor Panel (the Master Clip function applies not to the audio only).

    For the waveform to appear: fiddle the cursor or the playhead in the SM. (this is a bug).

  • Add audio comments for slide show

    I would like to add audio comments to a slideshow, no music.  Need to have the audio to be synchronized with the slide show. I use Apple hardware.

    Thank you, Alexander.

  • Add audio clips in MUSE

    I would like to add audio music saved on a CC2014 MUSE website designed for musicians.  I'm not sure how to do this.  Please notify.

    Hello

    some useful discussions

    Put mp3 music on the web page of muse?

    How to put an MP3 in muse

    Let me know if you have any question.

  • The blades does not add audio

    Hello again,

    I worked on a market course and stop for a while in Captivate 7. Today when I added 7 new landslides I went to add audio to slides via Audio > management of speech and slides do not appear for me to add the audio. I saved the course and restarted Captivate but the blades are still missing in the management section of the speech (they appear in the film and can be modified if)

    Hello

    Can you try to clean the preferences by closing 7 Captivate first, then go to: -.

    C:\Program Files (for 64 bit) or Program Files (x 86) (for 32 bit) \Adobe\ Adobe Captivate 7 x64\utils\ and CleanPreferencesWin.bat file to run.

    Launch of Captivate 7 by a right click on it and select run as administrator and see if that makes a difference.

    Kind regards

    Ajit

Maybe you are looking for