Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7696369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:45:49+00:00 2026-05-31T21:45:49+00:00

I did the following but it not work for always.It works if i launch

  • 0

I did the following but it not work for always.It works if i launch the app manually and then turn off the device and turn on the device my app is launched. But before turning off the device if i switched to another app then after switch-on the device,”My app is not getting launch”.

import net.rim.device.api.system.ApplicationDescriptor;
import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.ui.UiApplication;

public class MyApp extends UiApplication
{
public static void main(String args[]) {

    if (args.length == 0) 
    {                      
        ApplicationDescriptor current =         ApplicationDescriptor.currentApplicationDescriptor();             
        current.setPowerOnBehavior(ApplicationDescriptor.POWER_ON);
        ApplicationManager manager = ApplicationManager.getApplicationManager();
        manager.scheduleApplication(current, System.currentTimeMillis() 
        + 2000, true);
    }
    System.out.println("restarted !");
    MyApp app = new MyApp();
    app.enterEventDispatcher();
}

public MyApp()
{           
     pushScreen(new MyScreen());
}    

}

Please help..........it's important...and thanks a lot.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:45:50+00:00Added an answer on May 31, 2026 at 9:45 pm

    Im not a blackberry expert, but I develop for iOS and Android. The on/off switch or power button is hardly linked to the device, and the action performed when it’s pressed is written in the operating system, not in an application, I don’t think you’ll find an event listener for this button to be pressed, just imagine the security issues it could raise if an app could prevent the phone from turning off (or on …)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I create a const boost matrix? The following did not work: const
My question is essentially the same as the following one but the answer did
I did my research but haven't found an answer to the following problem: I
Did you ever have the following situation: you need to store information, but a
Consider the following code (for simplicity, I did not follow any C# coding rules).
Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
I'm using a couple of rewrite directives that always works before on apache2 but
I am using the following code but it is not working ? can I
I did the following steps to use the CDialog in win 32 application: Changed
Im a clojure beginner.I did the following steps as given on http://www.unexpected-vortices.com/clojure/brief-beginners-guide/development-env.html to setup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.