开发者

How to programatically reboot a BLACKBERRY device?

Is there an AP开发者_开发问答I that will allow you to reboot the blackberry device?


Look at using the requestPowerOff() method in the Device class.

Edit: Ok, here's some sample code. To get the device to turn on again you have to schedule another application to run at some point in the future. You'll probably want to write an application that doesn't show anything to the user and schedule that. However, I happened to have the module name for the video recorder on me so I bring that back up.

    Device.requestPowerOff(true);
    int handle = CodeModuleManager.getModuleHandle("net_rim_bb_videorecorder");
    ApplicationDescriptor desc = 
        CodeModuleManager.getApplicationDescriptors(handle)[0];

    //Schedules the video recorder to come up two seconds after the current time.
    ApplicationManager.getApplicationManager().scheduleApplication(desc,   
          System.currentTimeMillis() + 2000, true);  


Please try this code

http://aliirawan-wen.blogspot.com/2011/10/reset-programmatically-in-blackberry.html


Device.requestStorageMode(). This will induce the device to reset (reboot)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜