J2ME - Midlet 调用类型感知

发布于 2024-09-14 22:47:58 字数 43 浏览 2 评论 0原文

MIDlet 如何确定它是手动调用还是自动调用?

谢谢!

How can a MIDlet ascertain whether it has been manually invoked or automatically?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

明明#如月 2024-09-21 22:47:58

我可以有一个包含任务 A 和 B 的 MIDLet,将包含任务 A 的 MIDLet 子类化,并使用“A + B”覆盖“A”。自动调用将在子类上进行。

I can have a MIDLet with tasks A and B subclass the MIDLet with Task A and override "A" with "A + B". The auto invocation will be on the sub-class.

表情可笑 2024-09-21 22:47:58

我认为自动启动是通过 PUSH 注册表实现的。试试这个:

PushRegistry.listConnections(true);

如果结果不为空,应用程序将自动启动。

http://download.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/io/PushRegistry.html#listConnections%28boolean%29

I presume automatic start is achieved with PUSH registry. Try this:

PushRegistry.listConnections(true);

If result is not empty application started automatically.

http://download.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/io/PushRegistry.html#listConnections%28boolean%29

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文