1

是否有 API 可让您重新启动黑莓设备?

4

3 回答 3

2

查看在Device 类中使用requestPowerOff()方法。

编辑:好的,这里有一些示例代码。要让设备再次打开,您必须安排另一个应用程序在将来的某个时间运行。您可能想要编写一个不向用户显示任何内容的应用程序并安排它。但是,我碰巧有录像机的模块名称,所以我把它带回来了。

    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);  
于 2010-12-03T13:26:00.307 回答
0

请尝试此代码

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

于 2011-10-27T10:10:41.307 回答
-1

Device.requestStorageMode()。这将导致设备重置(重启)

于 2010-12-05T05:30:25.170 回答