如何使用 J2ME 防止黑莓应用程序进入睡眠模式?
我已经看到此建议执行 密钥注入 还请阅读此文档。
但我不确定第二种方法是否适用于 J2ME。
如何使用 J2ME 在黑莓中有效地完成此操作?
How to prevent the app from going to sleep mode in blackberry using J2ME?
I have seen this suggestion to do a Key Injection also read this docs from Native SDK.
But I am not sure whether the second method works with J2ME.
How can I do this efficently in blackberry with J2ME?
我想这或许可以实现... 您可以将键盘事件发送到设备。有关详细信息,请参阅此 防止黑莓进入睡眠模式。
I think this may be achieved ... you can send keyBoard event to the device. For more information see this Prevent BlackBerry From Going Into Sleep Mode.
关于禁用睡眠模式,您可以阅读这篇文章。
为了解决黑莓中的这个问题,我使用了下面的代码:
import net.rim.device.api.system.Backlight; import net.rim.device.api.util.DateTimeUtilities; int MAX_BACKLIGHT_TIMEOUT_SECS = 255; .... Backlight.setTimeout(MAX_BACKLIGHT_TIMEOUT_SECS); Timer timer_ = new Timer(); timer_.scheduleAtFixedRate(new TimerTask() { public void run() { Backlight.enable(true); } }, (MAX_BACKLIGHT_TIMEOUT_SECS - 1) * DateTimeUtilities.ONESECOND, (MAX_BACKLIGHT_TIMEOUT_SECS - 1) * DateTimeUtilities.ONESECOND);
About disabling sleep mode, you can read this article.
To solve this problem in blackberry I used code below:
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
我想这或许可以实现...
您可以将键盘事件发送到设备。有关详细信息,请参阅此 防止黑莓进入睡眠模式。
I think this may be achieved ...
you can send keyBoard event to the device. For more information see this Prevent BlackBerry From Going Into Sleep Mode.
关于禁用睡眠模式,您可以阅读这篇文章。
为了解决黑莓中的这个问题,我使用了下面的代码:
About disabling sleep mode, you can read this article.
To solve this problem in blackberry I used code below: