Wait on powerOff()

Hello

in my application I send via FTP some files and I need to wait until it finished so stop the bb user.

I use SystemListener, I've implemented on my screen and I do things in the same thread (I do not use invokeLater or something similar).

When I press the botton to stop at the stop near the bottom of the Terminal there are not running everything what I want... an idea?

Thank you

You put something in this routine and put a breakpoint to ensure that it is achieved:

public void powerOff() {}

}

Make sure that you add the SystemListener:

Application.getApplication () .addSystemListener (this);

Tags: BlackBerry Developers

Similar Questions

  • Turn off the power and wait for closing a connection

    Hello

    in a previous post, I ask for help with powerOff.

    I see my app to enter in this method, but I have a problem:

    I send a file to an FTP server using a class that I posted a few days ago.

    The problem is when the user stop device when the ftp stor command is not finished.

    I want to intercept and send abor command because without it, I find a file on the FTP server.

    PowerOff() I change a Boolean value to tell the ftp process I ask for demolition, when see ftp, it stop the command stor and sends an abor command

    The end of stor() method with a fake and I know the process to complete.

    The problem is how can I wait for this false in the main screen.

    I do something like

    while (isFtpSending())
        try { wait() } catch (InterruptedException e){}
    
    //isFtpSending is a synchronized method to change the value of boolean
    

    I set up a model of the observer, when the FTP class to end the process it send an update of class from the main screen and I do

    setFtpSending(false)
    notify()
    

    The problem is that when I do a wait(), it seems that off wire continues and stop the radio and all other process and stop device.

    Any idea?

    I think that what I need is a method to force the device to wait my thread.

    I hope someone understands something, sorry for the bad English.

    Thank you!

    p.d. I change the class FTP, because all the stor method has been synchronized, so I can't change the Boolean askForAbort until there finishes. Now sending bytes code is out of sync.

    Hello

    I find a work around the use of powerOffRequestd (int reason) of SystemListener2

    My end of thread before beginning the shutdown process.

    I see that the problem is that some link narrow wire of bb without asking or wait...

    I mark it as resolved

  • Concentrator VPN 3020 - wait of disconnection from the user before extinction

    Dear Forum community!

    We have a 3020 Cisco Concentrator VPN Balancing cluster configured, the device on main site with top priority. We would like to stop the master device due to short maintenance.

    I wonder if there is an option in GUI of VPN concentrator, waiting for all active sessions for volunteers end before the start/stop. Does anyone have experience on this feature?

    There are still about 80-100 remote user access VPN online and don't want to break the connections of these users with a simple poweroff.

    Thank you and BR

    Belabacsi

    Budapest, Hungary

    I just wanted to clarify two things.

    I always save my configuration file before restarting.  That's why I restart without saving the changes. I think that my wording could mislead.

    If you need your customers to be re - authenticate the VPN session after a period of time, for example 10 hours, the VPN session will be moved to another Member of the cluster when the session is authenticated again.  Each client must re-establish the VPN session on another hub in the cluster.   If you do not use this feature, you will need to wait until each of them ends its VPN session.

  • Apps stuck on waiting after updating iOS 10

    Hey guys,.

    Since upgrading to iOS 10 a couple of my applications like facebook are stuck on waiting and I can't access it. I tried all the usual fixes like restarting the phone and enter the purchased section on the app store, but it won't let me even remove apps or stop the download. I have tried everything and can't get to work. Any help would be greatly appreciated!

    Hello

    Sometimes simply knock on the home screen application stops the download and then you are able to resume and it works. Otherwise... I'm afraid you will have to reinstall iOS.

  • Stuck "waiting for the printer to be available."

    After initially looking at it's going to print, the printer dialog box displays "waiting for printer to be available" and it's there (even if the printer - inkjet HP series C3800 - is ready).

    Here is what I tried:

    Using the HP utility software on the same computer, I am able to successfully print a test page, which rules out a problem with the printer and its connection to the computer.

    Printing worked normally before moving on to the Sierra. I tried resetting the printing system and add new printer (Sierra recognizes very well). I also tried to run in case disk utility have a permissions problem.

    I'm stumped at this point. Help much appreciated.

    Same story, but with a HP Laserjet P3005dn, specific scenario, the exact symptoms, exact attempts to improve...

  • Stuck on "waiting" when apps update to ios10

    Dear,

    I have iPhone 5s, recently I did the update to ios10 and I received a note that some applications will be temporarily removed and since the 6 apps grey color, since the update about 3 days ago and stuck on "waiting".

    I tried to re-download the app Store apps but it did not work and I can't delete apps that appears on the screen in gray, but I can not open them.

    • Remove the phone crashes.
    • They do not appear as pending updates in the App store.
    • By clicking on the apps will not load anything.
    • Cannot delete applications through iTunes.
    • Reset fails.
    • Removal of many applications for more space fails. I have now 7G 16G free.
    • I tried all the suggestions on many sites and it did not work.

    Please let me know how to solve this problem.

    Hello. Try these general steps. They could help.

    1 reset your iPhone by pressing and holding the sleep/wake and home buttons.

    2 disconnect you from your iCloud account and reconnect again.

  • Podcasts downloads iOS 10.0.1 stuck "waiting...". »

    iPhone 6

    iOS version 10.0.1

    Podcasts version 2.5 (1134.109)

    Beginning September 17, 2016 only some of the newly released podcasts remain blocked in the "preparing to download" or "waiting...". "status. Three updates yesterday, it got stuck in "pending" status ». Two today, we're stuck in "waiting...". "So the two podcasts are sitting at the top of the app"waiting... ". "to download.

    Troubleshooting

    • Power cycling the phone.
    • Enabled / disable wifi
    • Remove all previously listed podcasts

    UPDATE: I solved solved this problem.

    • Go to the My Podcasts list (icons at the bottom of the app)
    • Choose the podcast which has an episode stuck in "waiting...". »
    • Click on the «...» "to the right of the blocked episode, then click on"cancel download ".
    • Click on the «...» "to the right of the episode and choose"Download episode ".
  • Have to wait 90 days before downloading music

    Hello

    I just created an iPhone 4S on my apple account and when I tried to access my music, he said I had to wait 90 days before re - download music. I don't really want to wait 90 days, so is there an easy way to solve this problem?

    Thank you

    Click here and ask for help from the staff of the iTunes Store. Unless they say otherwise, you have to wait.

    (144435)

  • iTunes on my iPad still shows 1800 downloads in waiting

    The iTunes App on my iPad shows Pro still over 1800 downloads in waiting.  I use iTunes Music game and all my music seems to be available.  I downloaded a few playlists on the iPad, but not all.  It seems that pending downloads are purchased items from the iTunes Store.  Why do they show when they are all loans to Music Match?

    They will not download when selected.  Suggestions how to get rid of the notification of download?

    The following steps can help with the strange behavior of synchronization. They assume that all the content you want on the device in your lending library for the restoration. If not see recover your iTunes from your iPod or an iOS device first. I would also recommend you copy everything off of the camera, if you have not already.

    1. Backup device.
    2. Restoration as a new device.
    3. Restore the backup that you made earlier.

    Use a backup encrypted if you want to keep passwords, wi - fi settings, history and health web data as appropriate.

    TT2

  • Difficulty for App Store remaining applications on waiting on the iPhone 6?

    Whenever I try to download anything from the App Store, the app is stuck at waiting.  I looked at the other discussions and I went to iTunes Store-more-Downloads and found something in this list, no icon, no progress, which seems to be wielding other downloads.  I can't understand how to remove.  It is iPhone 6, iOS 9.3.4.  I already tried to reset all settings, it did not work.  Is there a solution to my problem?

    Try to reset the App Store:

    Close the App Store completely from the window of the selector app by double clicking the Home button and slide up the App Store preview pane until it disappears from the display. Then sign out of the iTunes Store (in the settings).

    Then restart the unit.

    Then sign into the iTunes Store and try to download again.

    Also check the settings > general > Restrictions > and make sure that iTunes Store, Apps install, delete the Apps and In - App purchases are all under the section allow.

  • The Messenger app will be not updated. Stuck on "Waiting."... "and the logo in grey. How can I fix this or return to the previous edition that worked?

    I received a prompt on my Ipod touch 5th generation yesterday, that there is a new update of the Messenger application. So I tried to update, however, the app is now stuck on the phase "Waiting."... "and the logo has been disabled. I still get notifications of new messages from the app, but I can't open. I tried to remove and then reinstall the application but the application did not and the app store think that I always opened it. How can I fix this or return to the previous edition that worked?

    Thank you in advance!

    Hello cfossum,

    Looks like you have problems with a third party on your iPod touch app, since the Messages belongs to iOS and you would receive separate not quickly update.

    The resources below will provide some troubleshooting steps for the problem you are having with the Messenger application.

    If an application you have installed unexpectedly closes, unresponsive, or does not open

    Take care.

  • Downgrade my storage - how long must I wait?

    I chose to Downgrade my storage using my iPhone (General settings - iCloud) so how long should I wait?

    Here, anyone had any experience of decommissioning?

    I tried the official Apple support online, but the phone is the only option. No thanks.

    According to this article:

    Get help using iCloud - Support Apple storage

    Storage cuts will take effect after the end of your monthly or annual subscription in progress.

  • After the update to ios 9.3.4 I can't update my apps... said just wait

    I just updated my ios 9.3.4 ipad2 and now I can't update my apps.  It just says:... Pending.  Waiting for what I don't know.

    Try to reset the App Store:

    Close the App Store completely from the window of the selector app by double clicking the Home button and slide up the App Store preview pane until it disappears from the display. Then sign out of the iTunes Store (in the settings).

    Then restart the unit.

    Then sign into the iTunes Store and try to download again.

    Also check the settings > general > Restrictions > and make sure that iTunes Store, Apps install, delete the Apps and In - App purchases are all under the section allow.

  • Hi8 thru cam HDV into FCP 7: waiting for timecode

    Hello

    I have a bunch of Hi8 tapes I want to capture on the drive by running through Sony CCD-TR400 on the Canon HV - 20 MBPro & FCP 7.

    I can see the execution in the window capture, but when I hit capture now it gets no further than "Waiting for time code."

    I guess the Hi8 analog, but hoped the Canon with its AV > DV option would treat his way through.

    Any ideas?

    Is the only way to do this would save on tape dv on Canon HV-20 and then capture the disk?

    The best

    Elmer

    Hi8 uses only consumer re-writable (CCFC) timecode that is not readable by the PCF.  In the FCP capture settings, set "Device Control" device not controllable and then use Capture now capture rather than in batches.

    -DH

  • "waiting for encrypted google" does not allow me to open a Web site

    When I try to open lifenews.com, which I visited many times, there is a message saying left down "waiting for encrypted google." I don't even use google chrome? I don't know where to go to get rid of it, I don't want nothing blocked unless I specifically ask to be blocked. I did the research, said it's a blur, said another security settings to uncheck the ssl2 and ssl3. Nothing works. Can someone tell me please how to remove this thing waiting for encrypted google.

    You said blur, which is an add-on. Use the blur, or any extension of similar content filtering? If you think one of them might be the problem, you can test Firefox Safe mode. It is a standard diagnostic tool to disable extensions, hardware acceleration, and a few other advanced features of Firefox.

    Does not work if Firefox: Hold down the SHIFT key when you start Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

Maybe you are looking for

  • Acer Aspire V3 - 571G not hot.

    Hello I have an Acer Aspire V3-571G53216G50Makk for 3 years now. But since it's new it kept to reach high temperatures. And when I'm games it comes in close to 100 ° C, which is not good for the GPU & CPU. But the problem is that the fan does not spi

  • (Redirected) Precision M6500-white screen on startup and black screen on reboot

    Hello my Precision M6500 has recently begun to behave badly and has following symptoms. 1 display a white screen on market and a black screen on reboot, the OS boots aand, one that can discern by the jingle of windows at the end of the startup proced

  • Remove and reinsert the battery to reboot the computer from sleep mode

    When the computer goes into mode "sleep" due to inactivity, it cannot be started again until I completely remove and reinsert the battery. It is an Acer laptop with Windows 7 OS

  • Windows 8 recycle bin cannot remove blocked file or restore.

    Computer, only a few days now live have this corrupted video file into recycle bin 800 + MB that I can't move cannot empty the bin or restore this file. If I delete for bin of other files, I can delete those of Recycle Bin or restore. I tried windows

  • find roles that grant privileges to the same owner

    I did an impdo and I saw on a lot of these types of errors:ORA-39083: Type than object_grant cannot be created with the object error:ORA-01749: you cannot GRANT/REVOKE privileges to yourselfBecause sql is:GRANT SELECT ON "SMART." "" SOURCE_SYSTEM_DIM