How to intercept the Message event opened on existing messages Inbox

I asked in this thread for a way to override the event open Message in the Inbox so that I could see a message personalized with my own Viewer.

Doug suggested that I create a folder and message listeners to intercept events that interest me.

It works partially. The FolderListener can detect new messages coming, but he does nothing with the existing messages, so, in my app initialization, I loop over the existing messages and look for those to whom I want to fix a messageListener.

I reinforced with the code and see that the headphones are fervent. But the modified (event MessageEvent) method never fires on existing messages when I opened the. It fires only on messages received recently.

How can I catch the event message open for existing messages?

Also, when I catch the event on new messages, it opens my custom desktop, but when I go back to the list of messages, he had also opened the message with the default mail Viewer. Is there an equivalent to CONSUME_CLICK a button to say that if I got trapped in the event to just make my personalized treatment and not the default behavior?

Thank you!

Dave

What I do is I store the operating screen and close it after the event handling:

public void open(MessageEvent messageEvent)
{
    if (messageEvent.getMessageChangeType() == MessageEvent.OPENED)
    {
        final Screen mailScreen = UiApplication.getUiApplication().getActiveScreen();

        // DO YOUR THING WITH THE SCREEN

        String className = mailScreen.getClass().toString();

        /*
         * Only close the active screen if it's the EmailViewerScreen.
         *
         * Note: This is undocumented so I'm not sure whether this will always work.
         */
        if (className.endsWith(".EmailViewerScreen"))
        {
            UiApplication.getUiApplication().invokeLater(new Runnable()
            {
                public void run()
                {
                    try {
                        mailScreen.close();
                    }
                    catch(Throwable t) {
                        // log error
                    }
                }
            });
        }
        else {
            // log that Classname is not-a EmailViewerScreen
        }
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How to clear the administrative events - Event Viewer log

    Hello:

    Anyone know how to clear the administrative events log listed under custom in the event viewer views?

    All the logs listed in Windows logs do not have options to clear, but the back above.

    Thank you

    ColTom2

    Hey Colonel,

    It is because this isn't 'really' a newspaper, in itself.
    This is a Search of the newspaper (and there is MUCH more that most people know), filtered to show all events in administrative type.
    The source column shows you which newspaper it came from originally.

    To get rid of them, you will need to erase all records.

    If you want to get an idea:
    Go down to the Applications and Services logs, and expand.
    Microsoft, expand it.
    Then Windows.

    Nice list?
    You need to open and delete all. To really delete it.
    VP Tech Services

  • How to remove the message "not using current Version" boring?

    For months, my Firefox home page included a note that I do not have the latest version and provides a link to update. When I use the link I said "Congratulations, you are using the latest version." Adding insult to injury, there are not 20 minutes, I downloaded 27, and the message is still there. Almost the end of the world, but at this point, it is very annoying. How to remove the message?

    The old page of Google-Firefox has not changed since Firefox 4 is released, please disregard the information updated on this page.

  • When you type an e-mail, I think I hit the 'Save as draft' button by mistake. Now I can't find how to retrieve the message. Any suggestions?

    I was typing an email and press the 'Save as draft' button by mistake. Now I don't know how to recover the message. Any suggestions for anyone?

    Or in the menu button, there should be an option "folders." Look for the drafts folder.

  • I forgot my password for windows 7... and please tell me how to know the password to open with?

    I forgot my password for windows 7... and please tell me how to know the password to open with?

    I forgot my password for windows 7... and please tell me how to know the password to open with?

    Keep passwords secure - Microsoft on passwords strategy
    http://support.Microsoft.com/kb/189126

    What to do if you forget your Windows password:
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-to-do-if-you-forget-your-Windows-password

  • How to get the message to debug all to running page request OFA?

    Hello

    How to get the message to debug all to running page request OFA? do not use JDeveloper

    Thank you

    Renon,

    this.writeDiagnostics will be work AM and not CO. You mentioned that your code is AM, which is why I give (this.writeDiagnostics).

    You get an error when you use what to ? AM

    in CO, you must use pageContext. writeDiagnostics();

    You don't need to put any profile (other than DNF: Diagnostics), you just need to go to the Diagnostics - select the log on screen and choose the level that you used in the writeDiagnostics method.

    See you soon

    AJ

  • How to activate the message window to run from published resources

    HI -.

    Can someone tell me how to activate the message window, or something similar, to executing the script trace published resources.

    While I can use the message of the Director IDE window, what I want to do is use it when I execute scripts in time real (published resources).

    So my question is confused or upset the terminology, I apologize.

    I am very new to the use of Director (11.5).

    Thank you very much.

    Bob

    You can consult the help file of the Director for more details (minimum). You will see output in the message window when your code runs a statement 'put' (or 'trace'). However, you can use it as you would the application Message window by execute arbitrary code when you press ENTER at the end of a statement (without comment).

    Your whole project works like a projector or in Shockwave (in a browser)?

  • How to format the message in the response

    Hi all

    Please let me know how to format the message in the response.
    Sorry this is not the case associated with sql, plsql. I went in the way of asking questions in the forums oracle instructions. But I did not find. Help, please...

    I know this: when I write my thread I use
    .. to format  the code ,but while replying how to include post with formatted text. 
    
    
    Thanks,
    P prakash                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    >

    Thanks for the reply, I would like to know how you included the message formatted in your answer.
    Please let me know this...

    Hi again Prakash,

    Easy - just put ">"at the beginning lines you want to quote. "

    That is higher and space - when you answer, hit the double quotes in the bar
    at the top of the post - last symbol to the right and it will be automatically
    the post to which you want to reply.

    HTH,

    Paul...

  • How to remove the message from the status bar in panelCollecion?

    Hi all


    Worm 11.1.1.3.0 JDev


    How to remove the message from the status bar in panelCollecion?

    I am getting "Hidden columns" in the status bar... I want to delete that?

    Give suggestion...

    Concerning
    GOPs

    The GOPs wrote:
    Thanks for the reply, I tried the featuresOff attribute... but it is not working...

    As expected after the documents, since you are using JDeveloper 11.1.1.3.0 and not 11.1.1.4.0.

    concerning
    Jan

  • How to change the PCTFREE parameter for an existing table

    How to change the PCTFREE parameter for an existing table?

    Guys can you help me please

    Hello

    Of course it is possible.
    In this case you would export the table from the database (using old style exp)
    Start the import with the index_file option to generate the table/index instructions
    Modify the file created and updated the PCTFREE and remove any that need to be performed (default, if I remember correctly, he comments on the statements of the Index)
    Run the file for the table and the index created
    After that start the import with the option "ignore = yes".

    Make sure that you export only this particular table using "tables =
    Also in importing the "ignore = yes" will also be important data that still exists.

    In my view, however, this is not what you want to do. It's more complex, sensitive failure and the table should be deleted, so users are affected unnecessarily long.

    Success!
    FJFranken

  • How to clear the administrative events in 'eventvwr' in Windows 7

    Is anyone out there who can help me with this problem?   I'll tell you.

    (1) first run the command eventvwr...

    (2) this will open the Event Viewer log...

    (3) then click on "Custom views" and make a double click on it...

    (4) then you will see "Events Administrative", click on it...

    (5) a window opens showing all, WARINGS, error messages...

    I talked with Microsoft about this, they said there is no way to delete these...  I was able to clear all sections within a field by doing a "REFRESH in all...»  Microsoft also said to get rid of this, is only to restore your computer to a factory State...   I know that this can be done without a complete restoration...

    Can someone help, please

    Stephen

    Original title: Windows 7 'RUN' command 'eventvwr '.

    Moved to Virus & Malware

    Hi, thanks for trying, but your response was not useful at all, sorry...   I am looking for a way to remove all the symbols warning under "Administration events Logs '...  I know how to clear all the undernearth, but it is the main I want to erase without having to do a factory restore.

    Thank you

    Steve

    (1) I don't know why you're moping around the event viewer and what you're trying to achieve by disabling the administrative events. They are just the alerts and messages that won't just compensation without tackling the real problems reflected by alerts administrative event.

    (2) by design, you cannot delete it interface in the Event Viewer because it isn't 'really' a newspaper. Its a kind of a filter of administrative events of all cumulative newspapers (Application/security/system other applications etc.) you see in the eventvwr.

    (3) factory restore to clear the administrative events is a kind of a solution that might be similar to "Burn down your House to kill the rat"

    (4) so how do? Do it yourself manually. Create a file beats using below and run it... (Run as Admin)

    off @echo FOR /F "tokens = 1, 2 *" %%d IN ('bcdedit'), DO DEFINE adminTest = % V IF (noAdmin goto %adminTest%)==(Access) for /F "tokens = *" %%d in ('wevtutil.exe el') DO (call: do_clear ' % G ') echo echo, event logs have been cleared! ^ goto theEnd: do_clear echo %1 wevtutil.exe cl %1 goto of compensation: eof: noAdmin echo, you must run this script as an administrator! echo ^ ) : theEnd pause > NULL

    More details step by step

    https://www.YouTube.com/watch?v=1ehpcI7TZmw

    http://aspnettutorialonline.blogspot.com/2014/02/how-to-clear-administrative-events-in.html

    (5) results on my pc after doing... (Please note that it is dynamically regenerating alerts even after clearing alerts.) It's a sort of ephemeral clearing! )

    WARNING: -.
    It is a self-help guide that is tested before posting. Guide tested for Windows 10. However, use at your own risk.

  • How to remove the message "... now uses the full screen"?

    When you switch to full-screen playing a video, the message appears that the site now uses the full screen, which is often boring because it blocks the part of the screen for a few seconds. How this message can be deleted?

    In Firefox 40 and 41, you can probably remove this notification by setting full-screen - api .approval-required to false.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

  • Coming out of the block how to invite the message like "do you want to save changes?" so any changes made in the current block

    Hello

    I'm working on the Oracle forms 6i. I have a custom query search window (do not use the Oracle QUERY_FIND seeded window feature). Build manually (BLOCK_1 and WINDOW_1). When I click on the search button, then I Block table that has windows (BLOCK_2 and WINDOW_2) and in this form, I have a button called details. When I click on the Details button, it opens the details Block (BLOCK_3 and WINDOW_3).

    There is no functionality seeded t define the relationship of master details. (everything is customized)

    Now, if the user has made a few changes on the block of retail and click the X (close) on this window without COMMIT the record, then how can I display a message to the user as a block level saying that "Do You want to save changes?" and after selecting one of the action i.e. Yes, no or cancel how to perform the action according to the user's action.

    This form I have three different blocks and WINDOWS for individual block so when i have all three open window and click on F4, then it closes all windows of three then how can I close the window when the user uses them short key F4 to close the window.

    Thank you very much in advance.

    Melanie,

    Thanks for the update. I tried KEY-EXIT, WHEN now-BLOCK-INSTANCE, KEY of VALIDATION, but unfortunately these triggers are not fired. I found the work around that.

    I made after the code in the APP_CUSTOM package in the close_window procedure.

    IF: SYSTEM. BLOCK_STATUS = 'CHANGE '.

    THEN

    FND_MESSAGE. SET_STRING (' do you want to save the changes you made?) ');

    l_button:-fne_message.question(button1...icon);

    and then based on the user action that performs the action.

    END IF;

    It works for me. Problem solved.

    Thank you very much for your time and your suggestions.

  • How to disable the message «Click Tools to convert files pdf.»

    All versions of Windows.

    Adobe Reader 11.

    It appears in the upper right corner with every pdf file I opened.

    Click Tools to convert files to pdf format.

    How can I disable it to never appear please

    It seems that on all systems where you install Adobe Reader, you must open a .pdf file and then be sure to click on the X next to the message "Click on tools to convert files pdf.".

  • How to preview the message in mail on the mac sierra?

    I just upgraded to sierra and now I've lost the message preview pane in mail. I just message headers and the first 3 lines, which is normally only on the left side of the screen. He now saw there panal which shows the body of the email without having to open the email in a separate tab. Can I get it back? We tried dragging the cursor to move the panels, but it does not move

    Go to mail > Preferences > display and check the box use Classic configuration

Maybe you are looking for

  • How to scan a qr code

    How to scan a qr code

  • Original photo Screensaver

    Is it possible to have the origin of the file printed on the image when shown as a screen saver.  My XP will do, but I can't find any setting on Vista.

  • Videos do not work in the player, multimedia or internet explorer or vlc player?

    Hello I've had this problem for about 4-5 months now and my HP pavilion laptop would go blank when I was watching a video, it would then go and say something like 'windows recovered from a display error', then 5 minutes after that I would get the blu

  • Cannot get muse to update on the FTP server

    can someone help me?I'm uploading of changes on the site as usual, but what Muse open Web site after update nothing has changed.any ideas?

  • Large files in Illustrator

    HelloSometimes, I have a project that ends up being 2gig. I understand that it is probably the size photos that I'm setting but can I somehow make it work with more photos that I don't know how to reduce the photos without losing quality.Kind regards