Intercept touch green application event when the device is locked

Hi, I'm new to blackberry. What I want is I want to take a key event (green or red button) when the device is locked and do specific tasks in my application that runs in the background if this button is pressed. Is this possible? How can I do?

Just to be 100% accurate, it is possible for a keyListener (look to the top of the class) to pick up some events even when running in the background.  It can be different events when the device is locked.  Indeed, the events may be different depending on whether the "locked" screen is currently displayed or not. And the entire lot is dependent on operating system level, in other words, the same device running two different levels of OS will possess differently in terms of what keys can detect a listener in the background.

So if you have a BONE and a specific device, so it might be something you can do, especially if it is an older operating system.  However if you try to create something that works generically, then know that I've tried and failed!.

Tags: BlackBerry Developers

Similar Questions

  • How to register for an event when the device is connected to the PC in USB mode or sync

    I develop application on blackberry with phonegap.

    I want to hear event when the BlackBerry device is connected to the PC by USB MODE or sync.
    I saw mediagallery and applications Filemanager showing the dialogue that the application cannot be used when connected to the PC in USB mode.
    I want to display dialog similar to my request.
    Can anyone please help on how to do it.

    I saw blackberry webworks API

    public static Boolean blackberry.system.isMassStorageActive)

    who says if massstorage is active or not.

    But I can't keep on request this API every time. I'm looking for an API that gives me the reminder.

    Can you please help.

    On the side of Java, this can be done by implementing a FileSystemListener and the rootChanged method:

    public void rootChanged(final int state, String rootName) {
        if (rootName.equalsIgnoreCase("sdcard/")) {
            if (state == FileSystemListener.ROOT_ADDED) {
                /* SD Card is available. */
            } else if (state == FileSystemListener.ROOT_REMOVED) {
                /* SD Card is not available. */
            }
        }
    }
    

    I was not able to find a corresponding WebWorks API or API community well, so I think you need to create your own custom extension to implement this feature of the listener.
    https://developer.BlackBerry.com/HTML5/documentation/using_javascript_extensions_1866976_11.html

  • Continue to application play when the device goes into sleep mode

    Hey guys,.

    wondering if anyone knows how to maintain an active application when the unit goes into fashion watches?

    My application needs continue to work when the device goes into sleep mode if he went in that State by itself, or if the user put it to sleep.

    Yes I tried it on a physical device. It works, I promise you

    To clarify, here is what you will see when using KEEP_AWAKE:

    1 device shall not sleep when the application is currently active

    2. the device shall not sleep if the application is reduced, and you are in mode carousel

    3 device WILL sleep if the user switches to another application and full screen.

    In addition, another thing to know, if the unit is not assigned to the showcase mode, which is not by default, the audio stops when the user leaves your app. This is not related to sleep and is totally out of our control, but could be a good thing to add to your product details.

  • Permission to hook our thread of the application when the device is locked

    Hi, expert,

    During recent tests, we discovered that if the user doesn't give allow us certain permissions, but instead of fast approval such as permission to phone. When we access api related phone, OS would show a prompt for authorization, which is planned and well if the device is unlocked. However if the device is locked, our code would be hanging there to wait for the user to grant or deny, however, it would occur only when the device is unlocked. If the entire thread is blocked here.

    It's not good for our substantive application. Just wonder how other people solve this problem. In theory, we could avoid these calls if authorization is prompt device is locked, however it is too difficult to identify all the places because that would be a problem for all the permissions (not just permission to phone) and it would be a nightmare to code maintenance.  Another approach is to refuse authorisation every time that approval is fast. Not sure if we could lower the authorization or not. Any other suggestions on this?

    I did some looking on the internet and did not "find any post related.

    Thanks in advance.

    If the user decides to do it is the problem of the user, not yours.

  • Backlight.isEnabled () when the device is locked

    Hello

    When I check

    if(Backlight.isEnabled()){
    //whatever
    }
    

    and the unit is locked (Eve or key lock), what this post?

    I discovered that it returns true, when it is locked. If anyone can check that?

    Backlight.isEnabled () method determines whether or not the backlight is currently turned on.

    It does not reflect these as locked (Eve or keylock) or not.

    For more information see, http://www.blackberry.com/developers/docs/4.7.0api/net/rim/device/api/system/Backlight.html

  • Event when the application closes

    Hi *.

    is there an event when the PlayBook application is about to close? I would like to save at this time where the configuration etc.

    Not that I know of.  It will be an event at the level of the AIR that is triggered when this problem occurs, and I do not think that such an event is currently on the Tablet OS.

  • I received an error message on my iPad: the application has lost the device context when I try to open the Jam Cookie

    If someone got the error message: "the application has lost the device context? This appeared on my iPad on the application of jam cookie there is a thin red strip across a black screen with the error message locked in the red band. Help!

    Reset the iPad.  Press and hold the power and home together for 10 seconds until the Apple logo appears.

  • Events when the application starts

    At the start of my program, I need the user to enter two strings that are then used in the structures of the event. I have created a for this dialog box.

    In addition, if these strings must be changed during execution of the program, I have a button that fires an event value that made up the same dialog to change, then these new values are used through shift to other events registers.

    Is there a way to add a start of application event to the value of the button change event so that the sequence of the program is:

    Open the program

    the dialog box appears

    the user between two strings

    ... the main program using these values...

    the user clicks button changes to the

    the dialog box appears

    the user enters two new channels

    ... the main program using the new values.

    etc...

    Right now I do the first three steps outside the main program loop and there is a value change event that does exactly the same thing in the loop. This doesn't seem to be the most effective way of doing things.

    Kind regards

    Sebster.

    A simple solution is to write to a signaling of the value property of the button before the start of the loop.

    This will be the event queue and fire as soon as the structure of the event is ready to run.

    (To use it, you must create your badge is the switch and put it back to false in the event).

    Here's how it might look:

  • You need to set the drive letter to the USB Ports front before any device has been inserted - that won't change when the device is connected. I have Windows XP Professional with Visual Studio 6 installed

    You need to set the drive letter to the USB Ports front before any device has been inserted - that won't change when the device is connected. I have Windows XP Professional with Visual Studio 6 installed. Thanks for your help

    diana73,

    First of all, make sure that you're connected Administrators account to do.

    How to change a drive letter to change an existing drive letter on a drive, on a partition, or a volume, follow these steps:

    1. Sign in as an administrator or as a member of the Administrators group.
    2. Click Start , click run and type compmgmt.msc .
    3. In the left pane, and then click disk management .
    4. Right click on the drive, the partition, the logical drive or volume that you want to assign a drive letter to and then click change drive letter and paths .
    5. Click change .
    6. Click assign the following drive letter if it is not already selected, click the drive letter that you want to use, and then click OK .
    7. Click Yes when you are prompted to confirm the drive letter change.

    The letter of the drive, partition, or volume that you specified is changed, and the new drive letter is displayed in the appropriate drive, partition, or volume in the disk management tool.

    Good luck! Please rate me upward if you find my post helpful. Thank you!

  • BlackBerry Q5 there is no notification when the device restarts?

    My camera Q5 isn't just a notification when the device is restarted. For example, Blockr generated app notification when you restart device in my passport. But there is nothing of Q5. I did autoload or chairs of device suddenly it did not help. Please tell me what to do.

    I thank in advance.

    I found the reason.
    Q5 is my camera. I only use the Wifi connection and disable others. However, it has my wife SIM inside, which is more money. We do not use it. I didn't think about this topic until I have it took off the Q5. Then there is a notification when the device is restarted. : cant watch:

  • I have laptop Toshiba and windows 7, but my webcam is not working it shows that the device is locked by another application.

    I have laptop Toshiba and windows 7, but my webcam is not working it shows that the device is locked by another application. Help me please!

    For a built-in webcam see this support from manufacturers or their forums.

    You could I think trying a boot minimum http://support.microsoft.com/kb/929135 and see if its then OK

  • Our published application crashes when the user is not connected to WiFi

    It became clear after the last launch edition our published application crashes when the user is not connected to WiFi.

    This is a new one on us, someone at - it ideas?

    There was a bug in all versions of Viewer 24 and earlier that have arisen during the last iOS updated acme outside. If you upgrade to v25 or later version the issue will go away.

    Neil

  • How to store Internet Explorer running when the screen is locked?

    Hello! So, I am owner of a Surface... Yes! Somehow...

    Because Microsoft App Store refuses to give us of Pandora, Youtube and other needed applications, the only way to use these pages is through Internet Explorer...

    (in my opinion, they do it so that someone using Internet Explorer)

    Now, ok, I did that! I search for the pages I need and have pin them at the beginning... Yes, problem solved?

    NO.... The screen, if you don't touch anything, or move the cursor or something, it locks itself automatically after a certain time... and the music and the videos just stop playing.

    Now, when I go to Internet Options, I can't find anything to fix this. Change PC settings or... In customize, where it says lock screen Apps, it gives you the opportunity to choose "the apps run in the background...". ", but Internet Explorer is not available for this.

    Now, someone, anyone... tell me how that's possible! How can I leave Pandora running or a 1 hour running YouTube video?

    What are my options?

    1. setting of the Tablet does not interrupt or stop using the internet explore when the screen is locked... Is it still possible?

    2. the Tablet for only auto setting not lock screen when I use some applications, such as Internet Explorer (again probably not possible)

    3 magically App Store makes it available Youtube Pandora Facebook and other necessary apps (pfffff apparently does not have to spend)

    4. all that have worked for you guys... Any Suggestions?

    These are just little things that have made use of my annoying and incompetent little practical Surface... It's sad when smartphones can be more useful and practical than my Surface... really really sad. This comes from someone who wants this work effective and favourable way to the customer.

    Thank you for reading, for help, for viewing and understanding, I hope that I'm not the only one with this problem!

    > How can I leave Pandora running or a 1 hour

    You could try PRadio in the store:

    PRadio is a third Pandora Internet Radio App for Windows 8 modern.  It allows users to listen to music from the Pandora recommendation service in the background.

    Kate

  • Transfer works if the device is locked

    Hey just wondering does transfer if the devices are locked as I note when you use my iPhone the small icon is displayed only when my iPad is not locked and used but when my iPad is blocked I can't access the small icon on my phone and even on my iPhone iPad

    The device must be in use, according to transfer Bluetooth is active.

  • music player when the screen is locked

    Hello.
    Some devices show a practical widget when the screen is locked, but not of compact z1.
    I usually listen to music on spotify and when I received a call, the cell phone showed the widget on the locked screen. Not to mention that I was able to control spotify with the headset control.
    Then I stuck the screen again and it no longer works.
    I tried to find a configuration, but I couldn't.
    Can someone help me?
    Thank you

    Disable or remove the smart key and see.

Maybe you are looking for

  • How can I download the my story of the sites I have visited?

    I want to be able to export/download my history of the sites I visited. If there is Firefox feature or firefox add-on to do this, can someone please tell me how I can do. Thank you

  • HP Network check Helper

    HP Support Assistant indicates that the "Restart required" and also "HP network check Helper' Add - we ask to enable or not enable. What is the help check HP network?

  • Port of ThinkPad T510

    On the Thinkpad T510, what is the port on the right side of the laptop completely backwards? It is a small vertical rectangle with rounded corners.

  • USB devices are detected, but I can't access any fles

    Hello Ive had a very weird problem.  Everything was fine until this afternoon.  I unplugged a usb (Sandisk blade) flash drive and when I put a new one in I couldn't access the files.  He says drive D was there, but I couldn't access it and everything

  • Replace a deleted system file

    I was with a cleaner registry (CC) cleaner to clean my registry.  Now, I can't get my computer restarts after downloading a new program or by using Windows Update.  My system is Windows Vista 32-bit SP2, double processor.  Please help me!