ApplicationIndicator does not work until you restart the phone

I have a big problem with ApplicationIndicator. It does not work if I install my application for the first time... but after the phone reboot it works.

This is my code:

public class Indicator {
    private static Indicator instance;
    private ApplicationIndicator indicator;
    private ApplicationIcon icon;
    private int counter = 0;

    private Indicator() {
        icon = new ApplicationIcon(EncodedImage.getEncodedImageResource( "appIndicator.png" ));
        indicator = ApplicationIndicatorRegistry.getInstance().register(icon, false, true);
    }

    public static Indicator getInstance() {
        if (instance == null)
            instance =  new Indicator();
        return instance;
    }

    public void notify() {
        counter++;
        indicator.set(icon, counter);
        indicator.setVisible(true);
    }

    public void resetIconIndicator() {
        indicator.setVisible(false);
        counter = 0;
    }
}

Solved.

"The solution is"simple": the init code was originally of 'main' method '.

Is now just before the enterEventDispatcher().

I don't know why (init called too early in the life cycle of app?).. .but now it works.

Tags: BlackBerry Developers

Similar Questions

  • Firefox crashes constantly. I have restart firefox. It does not work. I restart the pc and then reopen firefox. It's still freezing?

    Can anyone suggest a better browser than firefox?
    I'm pretty tired of my browser gel every day. I have restart firefox. It does not work.
    I restart the pc and re-open the browser. It does not work.
    I have uninstall Add ons does not help.
    I just can't keep every day. I show that firefox is updated. 34.0.5

    You can try disabling OMTC and leave hardware acceleration in active Firefox.

    • topic: config page: layers.offmainthreadcomposition.enabled = 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.

    Create a new profile as a test to see if your profile is the source of the problem.

    See "create a profile":

    If the new profile works then you can transfer files from a profile already used in the new profile, but be careful not to copy files corrupted to avoid transporting more problems.

  • Windows can't open add printer. The local spooler service sprint does not work. Please restart the spooler or restart the machine.

    Hello world

    I have back Windows 10 to Windows 7 Home Premium as suggested previously and it worked fine. Then knit as well as the sound function keys, but I now have a problem with the printer. I have a Toshiba Satellite.

    I am trying to print and get the message "...". You must install a printer.

    I reinstalled my Epson WF-2630, but when I try to add a printer in devices and printers, I receive the message "Windows can't open add printer." The local spooler service sprint does not work. Please restart the spooler or restart the machine.

    Can someone help, please?

    Thank you very much

    WestAusShortie

    Hello West,

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    This problem may occur if the print spooler service is not running.

    Please refer to the suggestions of John Rubdy replied on April 29, 2010 and check if that helps.
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/Windows-cant-open-add-printer-the-local-print/41f98aad-3a9c-47A6-978b-7c20e3ce9e0b

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Why the highlighting of text in a PDF document does not work after you save the file

    Why the highlighting of text in a PDF document does not work after you save the file

    What application you use to highlight?

  • Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game. __Keyboard is very good

    Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game.
    Keyboard is fine.  Is this a compatibility issue?

    ---------------

  • print DigitalPersona finger scanning does not work after you install the recommended updates

    My impression of digitalpersona finger scanning does not work after you install the updates recommended on my dell Vista

    Hello

    1. do you have an error message?
    2. are you referring to the print scan hardware or software scan print that was supplied with the device?

    Method 1:
    I suggest you to update the software DigitalPersona from the link below https://www.digitalpersona.com/support/downloads/

  • PC disconnects the VPN after several hours, can not reconnect until you restart the PC.

    Hello

    I started to use a VPN private for a video game in general since last month, but I started to run into a problem, I can't fix... my PC tends to disconnect the VPN after awhile (6 ~ 12 hours of use?) and I can't reconnect to any VPN until I restart my PC.

    However... my normal internet connection seems to work very well.

    When I try to reconnect to the VPN after I fell, I'm greeted by this error:
    http://PUU.sh/bicqT/0a6f1f8537.PNG

    I'm on Windows 7 64 bit and I use the VPN client by default windows... idk what's his name, it's putting you in the network and sharing Center.

    I tried the following things:
    * restart the network map
    diagnose the issue with windows network diagnostics 7
    * / Clear DNS cache
    * / release and / renew lease
    * reset the internet connection
    * using the internet connection of a neighbor and I am still unable to connect to any VPN until you restart the PC.

    -diagnosis after disconnecting from the VPN wireless adapter arrives leads to this...
    http://PUU.sh/bibQs/9873c02068.PNG
    http://PUU.sh/bibn7/93ec6f0934.PNG
    http://PUU.sh/biboF/3c9f865f15.PNG
    http://PUU.sh/bibpw/b204c59f01.PNG
    http://PUU.sh/bibq9/a10d3246d1.PNG

    I can't fix it through diagnostics.

    In any case, this is a problem on my end because I share the VPN with 2 other friends and they do not suffer this problem... > _

    If there is a lack of information, please tell me and I will provide.

    Thanks for any help!

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.
    TechNet Forum
    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w7itpro

    Hope this information helps.

  • Laptop does not work after you remove the virus win32/winfixer

    Original title: win32/winfixer

    I had cleaned up my n cell phone it's a bad virus win32/winfixer and now my laptop does not work because I deleted it and also my big computer will not work right there problem downloading it says it needs to microsoft.net1.1sp1 ep, but it does not load become crazy pls help me...

    Hello

    1. what exactly happens when you start on the desktop?

    2. you get any error message?

    3. is your laptop work fine in safe mode?

    4. What are you trying to download?

    5. How are you trying to download?

    6. What is the full error message do you get?

    7. don't you make changes to the computer until the problem occurred?

    I suggest you to see link below and check if it helps.

    Method 1: How to fix a computer that does not start.

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/how-to-fix-computer-that-will-not-start

    More information: Advanced Troubleshooting for General startup problems in Windows XP: http://support.microsoft.com/kb/308041

    Hope this information is useful.

  • Camera does not work after you reduce the screen brightness

    Hello

    I have an application that uses the camera in QML. It works fine, but if the screen fades while my application is open the camera no longer until I restart the application.

    Here is the page of qml any camera:

    import bb.cascades 1.0
    import bb.cascades.multimedia 1.0
    
    /**
     * Most of this code was copied from:
     * https://developer.blackberry.com/cascades/documentation/design/camera/taking_a_photo_with_the_front_...
     */
    
    Page {
        property string pictureLocation: ""
        function closeCamera() {
            createReportNavigationPane.cameraClosed(pictureLocation)
            pictureLocation = "";
            saveID.enabled = false;
            sheetCamera.close();
        }
        titleBar: TitleBar {
            acceptAction: ActionItem {
                title: qsTr("Save")
                id: saveID
                enabled: false
                //title: "Save"
                onTriggered: {
                    closeCamera();
                }
            }
    
            // The 'Cancel' action
            dismissAction: ActionItem {
                title: "Cancel"
                onTriggered: {
                    pictureLocation = "";
                    closeCamera();
                }
            }
        }
        onCreationCompleted: {
            // Check to see if any cameras are currently accessible.
            if (camera.allCamerasAccessible) {
                // Open the rear camera.
                camera.open(CameraUnit.Rear);
                camera.isOpen = true
            }
        }
        Container {
            layout: DockLayout {
            }
    
            // The Camera object.
            Camera {
                id: camera
                preferredWidth: 768
                preferredHeight: 1280
                objectName: "camera"
                property bool photoBeingTaken
                property bool isOpen: false
                onTouch: {
                    if (event.isDown()) {
                        if (photoBeingTaken == false) {
    
                            // Take a photo, and automatically
                            // save it to the file system.
                            camera.capturePhoto();
                        }
                    }
                }
    
                // The following are examples of slots that can
                // be used with the Camera object to handle
                // the various signals that are emitted.
                onCameraOpened: {
                    // Once the camera is open, start the viewfinder.
                    camera.startViewfinder();
                }
                onCameraOpenFailed: {
                    console.debug("Camera cannot open");
                }
                onViewfinderStarted: {
                    console.debug("Viewfinder has been started");
                    photoBeingTaken = false;
                }
                onViewfinderStartFailed: {
                    console.debug("Viewfinder could not be started");
                }
                onPhotoCaptureFailed: {
                    console.debug("Photo could not be taken");
                    photoBeingTaken = false;
                }
                onPhotoSaveFailed: {
                    console.debug("Photo could not be saved");
                    photoBeingTaken = false;
                }
                onPhotoSaved: {
                    saveID.enabled = true;
                    photoBeingTaken = true;
                    console.debug("Photo has been successfully saved");
                    photoBeingTaken = false;
                    console.log(fileName);
                    pictureLocation = fileName;
                    var imageName = pictureLocation.substring(pictureLocation.lastIndexOf("/") + 1);
                    var imagePath = "/accounts/1000/shared/camera/" + imageName;
                    cameraPreview.imageSource = app.getCameraPreview(imageName, imagePath);
                }
            }
            Container {
                layout: StackLayout {
                }
                leftPadding: 10.0
                topPadding: 10.0
                Container {
                    preferredHeight: 200
                    preferredWidth: 200
                    horizontalAlignment: HorizontalAlignment.Left
                    Container {
                        verticalAlignment: VerticalAlignment.Center
                        ImageView {
                            id: cameraPreview
                            verticalAlignment: VerticalAlignment.Fill
                            horizontalAlignment: HorizontalAlignment.Fill
                            scalingMethod: ScalingMethod.Fill
                        }
                    }
                }
            }
        }
    }
    

    Thank you

    Gerry

    so, there is a signal of cameraResourceReleased which you can listen to that will tell you that the camera has been arrested.

    After that, you can restart the viewfinder after your application is in the foreground.

    We have a corner case that we are still working on what centers around the case when the screen starts to close (causing the camera to stop), but the user he wakes up before the browser tells your application in the background.  In this case, you may not receive a leading event.  You can probably work around this case by launching a timer and check, after a second or two, if the application has been deleted original or not... If it is still in the foreground, then you could try restart the viewfinder

    See you soon,.

    Sean

  • HDMI port does not work after you refresh the computer.

    Updated my computer and now my HDMI port does not work. I can not connect my labtop to TV.

    Are you sure that the additional monitor is turned on.  Try holding down the and then press P until it is selected to extend the screens.

    If this does not work, go to your computer manufacturer's website and download and install the latest version of your graphics drivers.

  • Narrative does not work when you create the Windows Movie Maker project

    The narration does not work

    I made 2 projects of film making. Narating was good. Remove all the two projects. Photos as well. And began a 3rd movie, project. This time the narration does not work.

    I made 2 projects of film making. Narating was good. Remove all the two projects. Photos as well. And began a 3rd movie, project. This time the narration does not work.

    ======================================
    I was wondering... work your tape recorder of Windows?

    Windows Vista - sound recording
    http://Windows.Microsoft.com/en-us/Windows-Vista/record-sound

    The following article might be worth a visit:

    How to: Add narration to a movie using Windows Movie Maker in Windows Vista. :-add-a-narration-to-a-movie-using-windows-movie-maker-in-windows-vista https://ask.qut.edu.au/app/answers/detail/a_id/4499/~/how-to.

    John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • Why my Intel wireless adapter is disconnected and does not restore until I restart the computer?

    Very randomly while I'm connected my computer won't go to any link and said I have no connection. I then try to solve the problem and it says to turn on my wireless adapter, but button is pressed and the light is on, so I turn it works without success. Then he tells me to check my router or a modem that always works so my ISP is not the problem. When this occurs, the computer does not have network connections, and has a red x beside the bars wireless not saying no connectivity, even give me the possibility to see the available wireless networks. The problem will persist until the computer is restarted, or the windows Explorer is restarted.

    Any ideas? Thank you.

    Pavilion dv6-3225dx
    Windows 7 Ultimate House
    Intel i3 M 350
    XY980UA #ABA

    Hello:

    The latest driver for your WIRELESS Intel network card is v 13.5.0 from 04/03/11.

    If this is the driver you have, then this is the most recent.

    If this isn't the case, you can give it a try, since you have nothing to lose. You shouldn't have to put up with unstable connections. I hope that the last version of driver if you are not running currently, solve your connection problems.

    I have included two versions of ILO since you listed only you had W7...

    W7 32-bit:

    http://Downloadcenter.Intel.com/Detail_Desc.aspx?AGR=Y&DwnldID=19855&ProdId=3199&lang=eng&OSVersion=Windows%207%2c%2032-bit * & DownloadType = software % 20Applications

    W7 64-bit:

    http://Downloadcenter.Intel.com/Detail_Desc.aspx?AGR=Y&DwnldID=19856&ProdId=3199&lang=eng&OSVersion=Windows%207%2c%2064-bit * & DownloadType = software % 20Applications

    Paul

  • USB does not work after you install the utility on Satellite A200 Intel chipsets

    Hello.
    I installed Win XP Pro SP2 on my Satellite A200-1SM and everything was ok until I installed Intel Chipset Software Installation Utility version 8.2.0.1014 (recent ones on the site of download of Toshiba; before this step all USB dev. worked properly), after all my USB devices wouldn't work. I had my windows up-to-date with updates from Microsoft, but that has not changed a thing.

    I use Vista once again, but still want to work one day at the XP operating system.

    Please help me if you can.

    Like the previous user said, the chipset must be installed as first pilot
    In addition, it seems that this laptop supports the Intel® GM965 + ICH8M Intel chip.
    It would be advisable to check the version of the Intel page directly

    Hey Buddy

  • Internet Explorer does not work after you install the kb2761451 update

    Original title: I downloaded the update and now Internet security security update kb2761451 explore does not open.  So I deleted it and Explorer opens.  This update is listed as important.  What should I do?

    The Explorer is 9.

    Hello

    Thanks for posting the question in the Microsoft Community!

    Internet Explorer stops working after the update kb2761451 is installed.

    The problem may occur if the updated components are corrupted.

    I suggest you follow the steps mentioned below:

    Method 1: Of reset Windows Update components

     

    See the site:

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Warning: this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-the-registry

    Method 2: run the Update of the system analysis tool

    See the site:

    System update scan tool corrects errors of Windows Update in Windows 8, Windows 7, Windows Vista, Windows Server 2008 R2 and Windows Server 2008

    http://support.Microsoft.com/kb/947821

    I hope this helps. If the problem persists, let know us and we would be happy to help you.

  • It does not work when you use the trigger to check the data of the other table.

    Please help me with this, I put a trigger on a table, but it can not work as I expect.

    case study: a class has many students, one of them is going to match.
    The purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to.
    Oracle version is 10.2.0.1.0.
    --table:
    DROP TABLE STU;
    DROP TABLE CLASS;
    
    create table CLASS(
    CID     VARCHAR2(5)   PRIMARY KEY,
    CNAME   VARCHAR2(20)  NOT NULL,
    SCHOSEN VARCHAR2(5));
     
    create table STU(
    SID     VARCHAR2(5)   PRIMARY KEY,
    SNAME   VARCHAR2(20)  NOT NULL,
    CID     VARCHAR2(5)   NOT NULL REFERENCES CLASS(CID) ON DELETE CASCADE);
    
    --data:
    --CLASS
    INSERT INTO CLASS(CID,CNAME) VALUES(1,'SUN');
    INSERT INTO CLASS(CID,CNAME) VALUES(2,'MOON');
    INSERT INTO CLASS(CID,CNAME) VALUES(3,'EARTH');
    --STU
    INSERT INTO STU VALUES(1,'JACK',1);
    INSERT INTO STU VALUES(2,'TOM',1);
    INSERT INTO STU VALUES(3,'LILY',2);
    INSERT INTO STU VALUES(4,'DUSTIN',3);
    
    --TRIGGER
    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    
    DECLARE
    DUMMY INTEGER;
    INVALID_STU EXCEPTION;
    VALID_STU EXCEPTION;
    MUTATING_TABLE EXCEPTION;
    PRAGMA EXCEPTION_INIT(MUTATING_TABLE, -4091);
    
    CURSOR DUMMY_CURSOR (ST VARCHAR2, CL VARCHAR2) IS
      SELECT SID FROM STU, CLASS
      WHERE STU.SID=ST AND STU.CID=CLASS.CID AND CLASS.CID=CL
        FOR UPDATE OF CLASS.SCHOSEN;
    
    BEGIN
      OPEN DUMMY_CURSOR(:NEW.SCHOSEN, :NEW.CID);
      FETCH DUMMY_CURSOR INTO DUMMY;
      IF DUMMY_CURSOR%NOTFOUND THEN
        RAISE INVALID_STU;
      ELSE
        RAISE VALID_STU;
      END IF;
      CLOSE DUMMY_CURSOR;
    EXCEPTION
      WHEN INVALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('PLEASE RE-ENTER CLASS ID AND STUDENT ID AS CLASS OR STUDENT IS NOT VALID.');
      WHEN VALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('STUDENT CHOOSE SUCCEFULLY!');
      WHEN MUTATING_TABLE THEN
        NULL;
    END;
    /
    Just copy and paste on it and try to run next:
    UPDATE CLASS
    SET SCHOSEN = 3
    WHERE CID = 1;
    Clearly, you can't student who is 3 as to Member of class 1. Please help me. Thank you.

    Published by: 991096 on March 1st, 2013 02:36

    Published by: 991096 on March 1st, 2013 03:03

    Published by: 991096 on March 1st, 2013 03:11

    Hello

    991096 wrote:
    1. the purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to. Then, when I try to choose 3 student-member of correspondence of class 1, should give me "PLEASE RE-ENTER ID AND STUDENT ID AS CLASS or STUDENT not IS NOT VALID."

    Then do something like this:

    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    DECLARE
        sid_found     stu.sid%TYPE;
    BEGIN
        dbms_output.put_line (:NEW.schosen || ' = schosen entering check_schosen');             SELECT  sid
             INTO    sid_found
         FROM      stu
         WHERE     sid     = :NEW.schosen
         AND     cid     = :NEW.cid
         AND     ROWNUM     = 1     -- to avoid TOO_MANY_ROWS
         ;
    EXCEPTION
        WHEN  NO_DATA_FOUND
        THEN
         RAISE_APPLICATION_ERROR ( -20000
                        , 'Please re-enter class id and student id as class ('
                          || :NEW.cid
                          || ') or student ('
                          || :NEW.schosen
                          || ') is not valid.'
                        );
    end;
    /
    

    DBMS_OUTPUT creates only a message. The message may not be displayed, and if this is the case, then the user cannot see it. The DML will still take place.
    I used instead, RAISE_APPLICATION_ERROR to keep the DML does not happen. It displays a message like

    ORA-20000: Please re-enter class id and student id as class (1) or student (3) is not valid.
    

    ' 2 ' game ' means ' an official competition in which two several people or teams competing.

    What individuals or teams are competing in this case?
    In any case, the question wasn't 'that 'game' means', but

    Frank Kulash wrote:
    What do you mean when you say "going to match?

    I think that now you're saying that the new values of (class.cid, class.schosen) must be equal to (or "fit") some existing (stu.cid, stu.sid).

    3. thanks for your tip, I learned how to use '{code} '.

    4. it's really goes with the exception of MUTATING_TABLE. So, how do to fix the trigger to show me INVALID_STU EXCEPTION when I try to choose a student does not belong
    a class?

    Don't refer to the table of class in the trigger, and the error table mutation occur. All the information you need are in the stu table, so there is no need to query the table of class, anyway.

Maybe you are looking for

  • cannot scan

    cannot scan.  error message reads OCR application is not installed on the computer. AIO officejet 8600 windows xp

  • Manage the tabs of Fox "+ top sites", how can I remove them individually?

    I have my home page the value display "+ top sites". I currently have websites that I do not use and my opening page is cluttered. How to delete these pages?

  • Pavilion laptop g6 - Wifi problem after upgrade to 8.1 Windows

    KIM I have a Pavilion Notebook - C3M29EA #AB7 g6 and upgraded to 8.1 windows yesterday. Since then, I was unable to detect my own wifi connection while I am able to detect my neighbours. (Everything worked fine before the update). Any suggestions?

  • import of task or

    Hallo! I have another question: when I use Dasylab with my USB-6009 measurer, I use tasks I set forward in the MAX. When I now transfer my spreadsheet to another computer, I have not normally tasks or exactly the same tasks, and to this end, I have t

  • No printing wirelessley

    I recently bought the HP Envy 120 printer. Ive been trying to print from my iPhone 6 (iOS 8.1) more AirPrintand my iMac (OS X 10.10) more wirelessand don't work. I tried to print a network test, but everything happens as job perfectly EXCEPT Internet