Key press detection when application is running in the background

Is it possible to detect any key presses when the application is in the background?

The key-related, pointer-related, and paint() methods will only be called while the Canvas is actually visible on the output device. These methods will therefore only be called on this Canvas object only after a call to showNotify() and before a call to hideNotify(). After hideNotify() has been called, none of the key, pointer, and paint methods will be called until after a subsequent call to showNotify() has returned. A call to a run() method resulting from callSerially() may occur irrespective of calls to showNotify() and hideNotify().
The showNotify() method is called prior to the Canvas actually being made visible on the display, and the hideNotify() method is called after the Canvas has been removed from the display. The visibility state of a Canvas (or any other Displayable object) may be queried through the use of the Displayable.isShown() method. The change in visibility state of a Canvas may be caused by the application management software moving MIDlets between foreground and background states, or by the system obscuring the Canvas with system screens. Thus, the calls to showNotify() and hideNotify() are not under the control of the MIDlet and may occur fairly frequently. Application developers are encouraged to perform expensive setup and teardown tasks outside the showNotify() and hideNotify() methods in order to make them as lightweight as possible.
The above answer you might have found in the JAVADOC, if you would have gone through the description of the Canvas class.
Don't forget your DUKES as I had to search the JAVADOC for giving you the exact answer, which you should have done that yourself only!!!
Shan!!!

Similar Messages

  • How do i see what applications are running in the background

    My iMac is running very slow my operating system is OS X Yosemite Version 10.10.2 with a 2.5 GHz Intel Core i5 Processor. How do I see what applications are running in the background?

    Reinstalling OS X Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Reinstalling OS X Without Erasing the Drive
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Alternatively, see:
    Reinstall OS X Without Erasing the Drive
    Choose the version you have installed now:
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • Please make a permanent solution to stop applications from running in the background

    'multitasking' is not a very usefull invention and should have a permanent solution, to stop applications from running in the background instead of having to go in and exit them. the only thing that is usefull is to go in and click on next song under music, everything else running in the background can just be exited as far as im concerned, its not like i have 400 applications, and i have to go searching through my phone to find them

    Push twice on the Home button to display running apps. Press on one and hold until they wiggle. Tap on the circled red "x" to remove each from the background. Note that backgrounded apps are not actually running until you access them except for those that have been written to run concurrently such as Music, which can continue playing while you are using other apps.

  • How do I find out what applications are running in the background

    I have a 2008 iMac with 2GB memory.  How do I find out what programs are running in the background?  I am going to buy a new iMac before the end of the year to replace this one.  When I looked at Activity Monitor it shows 1.8Gb used but doesn't tell all the programs running.

    open activity monitor [if it doesnt launch click winders>Activity Monitor]. then it'll show all proceses

  • Field catalogue for ALV Grid when program is run in the background

    Hi All,
    I have an ALV report that contains approx 27 fields.  Not all of these fields will be relevant for different Users, and many will want to change the order the fields appear in.
    When running on line the User can set a variant to present the data as they wish.  However, I need to email this report to the SAP Inbox with the fields displayed in the same Order with uncessary fields hidden as stated in the Field Catalogue.
    On-line none of this is an issue, however GET_FRONTEND_FIELDCATALOG cannot be used in Background, and attribute MT_FIELDCAT_LOCAL is Private and cannot be accessed.
    I have looked at using Class CL_ ALV_VARIANT to try to read the Variant being used, but couldn't get the information about the Variant coming back, instead I get an error in CL_ALV_VARIANT->LOAD_VARIANT.
    Can anybody recommend how to the Field Cat for a Variant for background processing?
    Thanks,
    Tony.

    Hi.
    You can not use an ALV report in Background or write to spool because it is a kind of dialog program.
    You can write only  a List report to spool so please find others sulotions.
    Hope it helps.
    Sayan.

  • How to detect any key pressed for program running in the background?

    Hi All,
    is it possible to detect when any key is pressed if a java program is not in the focus? For example, when I have a console based program I can write something like:
    System.in.read();
    and wait until any key is pressed. However, if I move the mouse away from the console and make any other window active, the console program "doesn't hear" anything. Ok, it's clear, of course, but how is it possible to make the program detect any keys pressed even if it's running in the background?
    Thanks a lot for any hints!

    qnx wrote:
    1) Stop trying to make spyware. -> I don't do anything like this!
    2) Stop re-posting the same questions. -> didn't know they are the same, sorry.
    3) Stop taking us for fools. -> what? Honestly, I don't think that I realy deserved this :)With a limited posting history and the type of questions you are asking they are unusual.
    There are very few legitimate problem domains that would require what you are asking about. There are illegitimate ones though. And the legitimate ones would generally require someone with quite a bit of programming experience and would also be required (the fact that java can't do it would not get rid of the requirement.)
    Thus one might make assumptions about your intentions.

  • Page breaks appear in the spool output of report when run in the background

    Hi All,
    Report is using fm 'REUSE_ALV_GRID_DISPLAY' to display the report. parameters passed to this fm for display are :it_fieldcat,is_layout,it_events,t_outtab.
    Page breaks appear in the spool output when report is run in the background.These page breaks needs to be removed. When executed in the background, the excel extract should be the same as if pulling directly from the report itself.
    How to remove the page breaks in background?
    Thanks & Regards,
    Abhishek Singh

    Hi
    You can use the below code , which the reprt run in background. If you run the report in background thenyou need to use  'REUSE_ALV_LIST_DISPLAY'
    if sy-batch = ' '.
    call 'REUSE_ALV_GRID_DISPLAY'.
    else.
    call 'REUSE_ALV_LIST_DISPLAY'.
    endif.
    if you are using OO alv then write this code..
    CALL METHOD cl_gui_alv_grid=>offline
    RECEIVING e_offline = off.
    IF off IS INITIAL.
    CREATE OBJECT g_custom_container
    EXPORTING container_name = g_container.
    ENDIF.
    Regards

  • SAFARI: running in the background:

    When I access a website there is an automatic refresh of the content. When I open a different webpage with Safari, then the automatic refresh on the first page stopps! How can I have a webpage be refreshed in background?
    Does Safari download content when it is minimized / not visible?
    When I go back to the first page, then the automatic refresh is not there any more. The function has been de-activated by Safari on Ipad. (On a Firefox on windows there is no such problem). How can I get the same webpage behaviour than before. (I know that reloading the page does the job. But this should be automatic and not from the user)

    The ipad like a lot of other mobile devices use a type of multitasking that differs from multitasking you would find on Mac OS X, Windows or Linux.  Apple chooses to put most background apps on iOS devices in a suspended mode which allows the application to be paused in the background and then respond quickly when brought to the foreground. Some application functions can continue to run in the background.
    Features that are allowed to run in the background are music, location services, airplay, VoIP, push notifications, but it is still up to the developers to make use of this functionality.
    I don't believe Safari is one of the applications that will continue to run in the background.
    Why does Apple choose to do this? Short answer: Battery life and performance.  If app developers were allowed to choose whether or not to have their application to run in the background, bad programmers would quickly kill the performance and battery on the iOS device.
    Some devices such as andriod phones and the blackberry playbook allow broader multi-tasking. The trade off? Andriod phones have task killers, which forces the user to manage their performance and battery life. The playbook comes shipped with a default of using suspended multi-tasking on vs. full multi-tasking - since full multi-tasking would again affect performance and battery life.
    I agree it would be nice if webpages continued to load if Safari is in the background, and maybe this will be added / enabled in the future. I think Apples design provides a better user experience and still allows most of the functions to run in the background that need to.  (I don't need a movie to play in the background or game).
    My guess would be Safari doesn't allow background use right not because of issues like auto-refresh pages, which again would affect performance and battery.

  • Cisco mobile does not running in the background ont my ipad

    Hi
    I have a Cisco Callmanager 7.1.5, an ASA5510, an Iphone and an Ipad
    I have configure the VPN on my iphone and my ipad and I can make a VPN connection to the ASA through the WIFI
    I have configure the  Cisco Mobile 8.1.2.3245 on my iphone and my ipad.
    If the application is open, I am connected to the CCM and I can make and receive calls.
    On the iphone when the application is  running in the background, its good I can receive calls
    On the ipad when the application is running in the background, I can't receive calls, I am unregistered
    On the ipad, if I disconnect the VPN, and make a WIFI connection on my local network. When the application is running in the background, I can receive calls.
    It is an ipad2 with iso 5.0.1 (9A405)
    I reverse the ID of the IPAD and IPHONE, and it is the same.
    The problem is only on the IPAD when there is my VPN connection
    Could you help me?
    Thanks
    nicolas

    A double click on the Home button will reveal a tray containing all apps that are currently running (suspended?).
    Side swiping this will reveal as many as are active, with a swipe to the right when on the first display will reveal further controls for the iPad, mainly relating to the iPod part, but also containing a screen lock option I believe.
    Click and hold any one of them till they 'jiggle' and show a - you can then click this to remove it, relaunching the app as required in the normal way.
    Regards,
    Colin R.
    Message was edited by: Colin Robinson
    PS Tap the Home button once to get out of this mode.

  • How can I know what apps are running in the background of Q10

    My battery is not lasting more than 12 hours even though I'm moderately using it. How can I tell which applications are running in the background?

    As of now, the BB10 does not allow any apps to run in the background unless they are baked in the OS or in the active frames. So if an app is not in a active frame, no app is running in the background. try maximizing your battery by switching to wif whenever you have a wifi network.
    Twitter: @ukmight
    1. Click on the " Like " button if you find anything helpful posted.
    2. If any of the replies in your post has resolved your problem, mark the reply(ies) as " Solution ", so that others can readily view the solution instead of creating another redundant post.

  • Images are not comming out when application is running through jar file.

    I have written an application program using j2sdk1.4.1 that needs your help.
    My application folder's contents.....................................................................................
         C:\Examination\Examination.class <-----This is the main class and application's entry point.
         C:\Examination\ExamBox.class
         C:\Examination\PaperSetterBox.class
         C:\Examination\pspBox.class
         C:\Examination\epBox.class
         C:\Examination\TimerBox.class
         C:\Examination\ReportCardBox.class
         C:\Examination\HelpBox.class
         C:\Examination\AboutBox.class
         C:\Examination\Images\(some jpg & gif files)
         C:\Examination\Sounds\(some au files)
    Compilation Report:     There was no error.
    Execution Report :     Was working properly using the command:- java Examination
    Now, I created a jar file for my application in the following steps.................................
              STEP-1:          Firstly, I created a text file(mainclassInfo.txt) that contains
              the line:--     Main-Class: Examination
              This line would be automatically added to the default manifest file when I would include the                name of that text file with the command to create the jar file.
              Location of the text file I created:     C:\mainClassInfo.txt
              STEP-2:          Then I went to C:\Examination and executed the following command(by using                'Command prompt'):--------------------------------------------------------------------
    jar cmf C:\mainClassInfo.txt Examination.jar Examination.class ExamBox.class PaperSetterBox.class pspBox.class epBox.class TimerBox.class ReportCardBox.class HelpBox.class AboutBox.class Images Sounds
    Finally, I got the jar file:-     Examination.jar
    Double clicking on it application ran as it was expected.
    Then, I thought, that as all the files & folders the application needed to run properly were packaged in the jar file; I should delete all the contents of the folder 'Examination', so that no one could see or use anything of the resources easily. I did that.
    So, then it became only:-- C:\Examination\Examination.jar
    Thereafter, I tried to run the application again and there a problem occurred! The application was running, but the images, those were to be used and shown by the application were missing somehow!!
    Moreover, when I kept a copy of those 2 folders('Images' and 'Sounds') into the C:\Examination and ran the application again all the images came out normally!
    I just can't understand why it's happening so mysterious?
    I don't want to leave anything of the resources in an open place; I mean, outside of the jar file. The images should be used and shown by the application.
    Help me please!

    The Image class itself does not have any methods for loading images from files so you must be using something more. Most methods for loading images from files have an overload that lets you use a URL, so you just need to use that method with a call to getResource like in the other thread. If you can't think of anything else, you can use ImageIcon to load an Image (the Image is returned by a call to ImageIcon.getImage). See also "how to use icons" from the swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html

  • Put my macbook pro to sleep. When I opened it, the desktop window is small and I can't resize it. All applications now run in the smaller size window.  Can't make it fill the screen. Just switched from windows.  Thank you.

    Put my macbook pro to sleep. When I opened it, the desktop window is small and I can't resize it. All applications now run in the smaller size window.  Can't make it fill the screen. Just switched from windows.  Thank you.

    Check to see if the resolution has been changed in System Preferences.
    Allan

  • When making a call, sometimes, my iPhone 5 , gets stuck on 'Calling' than I have to press END..but still nothing happens, than when I press HOME button, the call app keeps running in the background and it keeps saying CALLING... please help

    When making a call, sometimes, my iPhone 5 , gets stuck on 'Calling' than I have to press END..but still nothing happens, than when I press HOME button, the call app keeps running in the background and it keeps saying CALLING... than I have to wait 2 - 3 minutes and call again.
    please help

    Has nothing to do with the SIM or master reset.  This has been done to my phone.  The SIM once and the factory reset many times over.  You all just sold us a bad piece of equipment and have us by the tail with our contracts so none of us can get a new phone without paying full price or re-upping our contract.  I just got off the phone last night with your high up tech people (you know, the hidden number we get once we tear into your support people enough), they went into my phone again and still didn't find anything wrong.  I about got fired from my job for not getting my calls and texts.  The BBB has now been contacted, and I feel your end should shore this up for all of us!

  • How do I show applications running in the background? And how do I close them down? In class, the instructor press something but she did not go into Settings. Does anyone know?

    How do I show applications running in the background? And how do I close them down? In class, the instructor press something but she did not go into Settings. Does anyone know?

    Double-click the home button that will bring up all the applications in the background.
    To close then you swipe the application upward and it will close.

  • Since the update i can not open webpage,also even when i close it keeps running in the background.

    since the update i can not open any webpage,ex:homepage i use www.besthomepageever,nothing open there,i tried yahoo.com same thing,plus it keeps running in the background when i close it and im asked to restart the comp.
    First time in all these year i have problem like this
    Thanks
    Gerard
    Ps,i deleted it and reinstalled it same thing

    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Press the '''Alt''' or '''F10''' key to bring up the tool bar.
    Followed by;
    Windows; '''Tools > Options'''
    Linux; '''Edit > Preferences'''
    Mac; ''application name'' '''> Preferences'''
    Then '''Advanced > General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?. Then restart.

Maybe you are looking for

  • Why can't I buy and use app from app store?

    please help me, I can't buy Apps from App store and if I can buy this, I'll can't use this, what's happen with my account? Please help me... Thanks!!!

  • Can't Drag Icons

    I'm working in OS X 10.2.8 and all of a sudden the icons on my desktop won't move. Also, cannot use selection tool to move objects when working in Illustrator CS2 or Corel Draw. I've read all the posts listed here and tried every suggestion to no ava

  • Connect Selected End Point Question

    Hi everyone: I am trying to connect selected end points. I have drawn my open path and Illustrator is not letting me select my two anchor points. I keep getting selections of the entire path. So, of course, the connect selected end points icon is gre

  • Updating list output during execution.

    Hi, Is it possible to somehow update report list output during code execution ? What I'm trying to do is to LOOP at all files in a certain directory, process them and return some output. The process is time consuming. So I'd like the user not to wait

  • Ttys are not owned by group tty (and /dev/pts verses /dev/vc)

    I just tried to do a "mesg y" in my terminal on my dekstop and got the error: mesg: error: tty device is not owned by group `tty'. So I chowned my tty to belong to group tty (previously it was owned by my generic group "users", of which b-con is a me