Thursday, February 12, 2009

Code: soft reboot BlackBerry device by coding


Here is the sample code to soft reboot the blackberry device using codes :


public static final void powerCycle (int delayToPowerOn) {
int timeDelay = 1000 * delayToPowerOn;
ApplicationManager myMgr = ApplicationManager.getApplicationManager();
ApplicationDescriptor myDsc = ApplicationDescriptor.currentApplicationDescriptor();

// myMgr.setCurrentPowerOnBehavior(myDsc.POWER_ON);

Date myDate = new Date();

myMgr.scheduleApplication(myDsc, myDate.getTime()+timeDelay, true);
net.rim.device.api.system.Device.requestPowerOff( true);

}

1 comment:

  1. How to coding to change 3'party app icon ?

    Thank a lot.
    nice 2 meet u.

    ReplyDelete

Place your comments here...