How to detect the screen off the power of the event

Is it possible to detect the screen off the power of the event?  I am looking to detect when the screen turns off due to time-out or press the button of the lock screen.  Similarly, I would need to detect where the screen turns back on.  I searched through the API WebWorks and forums but have not found anything relevant.  Maybe I'm looking just the wrong thing. Any help would be appreciated.

Hi deedubbu,

I'm certainly not an Expert in Java BB so it might be a good idea to post something on these forums, but a quick search on Google, it seems that you should be able to encapsulate event

In Exchange for my Google search, I humbly request post you the result on our community API github repo

Tags: BlackBerry Developers

Similar Questions

  • How to detect the event mouseclick-control

    I am trying to relax the max property Z on the scale of a graph of intensity to be changed from the front panel.  In the VI attached, I use an increment/decrement control and just detect a value change event (without taking into account the value of the control).  It works very well, even if it's a bit of a hack.

    I want to make them much more functional.  My main question is this: How can I detect an event 'control-click '?  I intend to use this event to change the max of graphic intensity by a factor rather than an additive value.

    A second quick question: on the numerical control, is there a way I can get rid of the number in the display space and leave only the increment/decrement buttons?

    Thank you

    Allan

    Are you talking about the button increase/decrease on a digital control?  I thought you had Boolean separate to increment and decrement. It's hard.  You can't be the PlatMods when using a value change event.  You will maybe make your own controls inc/dec and update a digital indicator rather than use a digital command.

  • How to detect the number of created quickobjects

    How to detect the number of quickobjects created? quickobject are quickbox2d.

    Basically, I have a timer that will countdown to 4 seconds and it will create a falling ball, it will get removed when she falls down. However, I want only there so that if more than 5 bullets are in step, it will cease to create until it is less than 5 to start creating some balls again. Is there a way I can do?

    It's the timer to create the ball

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (TimerEvent.TIMER, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

    check the length of _balls_array.  If it is greater than 5, do not create another bullet:

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (IMER TimerEvent.T, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    If (_balls_array.length<>

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

  • How to detect the window closing event and to do some tasks before leaving

    Hello

    Someone knows how to detect the window closing event and to do some tasks before leaving?

    Sridhar

    Structure of the event allows to detect the window closing event. In the structure of the event,.

    Select this VI-> close round table for this task. See attached picture.

  • How to detect the sign of a number?

    I output which gives the number of negative or positive. My problem is how to detect the sign of the Boolean number and output? For example if the input number is negative as - 23.11 I want to output the value false and if the number is positive as 17.99 I want to output true.

    T H A N K S!

    Test if the number is greater than or equal zero.

  • How to detect the key ALT pressed in os7

    Hai,

    How to detect the key ALT pressed in Os7...

    Can I use the source for os 7 as below? ,

    protected boolean keyStatus (int keycode final, time final int) {}

    If (Keypad.key (keycode) == Keypad.KEY_ALT) {}

    ...

    Returns true;

    } else

    Return super.keyStatus (keycode, time);

    }

    and also I want to know which is the return of this method? In detail
    How to detect the other touches also?
    What are the updations or changes in the code, on os6 os7?

    KeyCode is a bit model, if you use "is" to compare you won't get accurate results, you should use the operator '& '.

    See
    http://supportforums.BlackBerry.com/T5/Java-development/detect-ALT-and-shift-key-clicks/Ta-p/444976

  • How to detect the color pages in a PDF file?

    I use a plug-in of Acrobat C++ read/modify a PDF file.

    I need to get the total number of pages in the PDF file and the page numbers of the pages in color.

    So far, I was able to get the total number of pages using PDDocGetNumPages() with no problems.

    However, I can't find an API that lets me know if a particular page is color or not. Is there a way to do this?

    Thanks in advance!

    But what happens if there are RGB data which means black or grey (R == G == B), that means black or RGB?

    There is a code sample in the SDK to browse content in the PDF file, and then you can get the color space and color of each object.

    But you really need to do background research on the colors & spaces to achieve this properly.

    From: Sachintha81 [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Wednesday, February 8, 2012 16:57:10-0800

    To: Leonard Rosenthol [email protected]<>[email protected]>

    Topic: How to detect the color pages in a PDF file?

    Re: How to detect the color pages in a PDF file?

    created by Sachintha81http://forums.adobe.com/people/Sachintha81> in Acrobat SDK - see the discussion complete onhttp://forums.adobe.com/message/4194889#4194889

  • How to detect the operating system to PDF using javascript

    Hello

    How to detect the operating system to PDF using javascript. (Javascript console)

    Thanks in advance.

    App.Platform will return "WIN", "MAC" or "UNIX".

  • How to get the event when we change our simcard in BB device

    Hi all

    Please, someone tell how to get the event or any listener method that can automatically called when we change our SIM card device.

    Thanks in advance,

    TEJ

    Hi Tej,

    I came across some post, which may be useful for you

    http://supportforums.BlackBerry.com/T5/Java-development/is-there-a-way-to-get-the-mobile-or-phone-nu...

    http://supportforums.BlackBerry.com/T5/Java-development/is-SIM-ID-really-exist/m-p/54407#M5954

  • I don't see the event live from the URL indicated. How to join the event online please?

    I don't see the event live from the URL indicated. How to join the event online please?

    At the time you posted this question, the STM sessions had not started yet. The event started at 9:00 PT.  Please let me know if you are still experiencing difficulties to connect.

    Note: all sessions will be available for consultation on request after the event is finished at 1:00 pm PT.

    See you soon,.

    LKR

  • How to check the event.target type in the "if" statement

    Hi, I have "roll-over" event listener and I wish that only works with music videos (without textfields etc.). I would write something like this:

    if(Event.Target == MovieClip) {do something}

    else {do something}

    This does not work properly.

    How to check the event.target type in the "if"?

    Thanks for any help.

    :

    If (getQualifiedClassName (Event.Target) == 'flash. display::MovieClip') {do something}

    else {do something}

    .

  • How to get the event when you click Add another button in a table.

    Hello
    How to recognize the event in processFormRequest click on the button Add another line of the footer of a table?

    Suppose if the ID is anotherRow (I mean ID of the button to add another line of the footer)

    If I give if (pageContext.getParameter ("anotherRow")! = null)... its not recognizing the event that is returning null only...

    I want to perform certain actions when the user clicks Add another line of footer. Please let me know the details of how identify when add another line is clicked...

    Thank you
    Srikanth

    Hello

    If you have only one table with add_row_button, and then copy the following code works perfectly

    If (tableBean.getName () .equals (pageContext.getParameter (SOURCE_PARAM)))
    (& ADD_ROWS_EVENT.equals (pageContext.getParameter (EVENT_PARAM)))
    {
    ...
    }

    tableBean is the Handle for your advanced table, hope, it will help you.

    Kind regards
    Out Sharma

  • How to detect the automatic rotation of the screen on the storm?

    Hello

    I'm trying to resize BitmapField change direction of the screen. But I don't know how to detect it.

    Can you help me?

    What class should I use to this problem?

    Thank you.

    Override sublayout on your screen in order to detect changes in orientation.

    public void sublayout(int width, int height)
    {
       // Your code here
       super.sublayout(width,height);
    }
    
  • How to detect the relay ON / OFF state with PCI 6221 analog input card

    In order to test if a relay is ON / OFF using my card PCI 6221 DAQ devices and ports of HAVE it.  I conect of the relay contacts to an AO giving 5 v and the other contact to an AI in order to detect the corrent.  In addition to a bridge is necessary to close the circuit betweeb the AO and AI.

    Shoud this bridge conect the MASS of two ports?

    The plan is: relay - AO (5 v) - AO GND - GND AI - AI0 -.

    This does not work and gives a continuous corrent to 10 V (I think it is a saturated)

    Hint, please?

    The simplest connection is:

    • One side of the relay contact: + 5V PCI 6221

    • Other side of the relay contact: all DI PCI - 6221

    But I would add a DI (for example 10 k) resistance to GND of the PCI 6221. This will outline the entrance to GND when the relay contact is open.

  • How to detect the user touch and hold the screen for touch screen devices?

    Hello

    I want my code to do the following:

    when user touch and hold on the screen{
        myThread.start();
    }
    
    when user release the finger on the screen{
        myThread.done();  //a method to stop the thread
    }
    

    Any ideas? Thank you very much

    Never to change never return super.touchEvent (...) to return true (well, you can do it for complete events such as MOVE or GESTURE. SWIPE_...) -you will disrupt the event processing complex (just about everything, but downwards and upwards).

    The code works for me (I do something else, with more visual impact, so I know for sure that it does). One thing, try - check the status of your Thread (isAlive()) before you start, as DOWN seems to be generated twice.

    If you could be more specific with what "won't work" is, I would be able to help more.

Maybe you are looking for