开发者

J2ME - Midlet invocation type awareness

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

Thanks!开发者_如何学JAVA


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.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜