开发者

J2ME - Midlet invocation type awareness

开发者 https://www.devze.com 2023-01-12 02:05 出处:网络
How can a MIDlet ascertain whether it has been manually invoked or automatically? Thanks!开发者_如何学JAVAI can have a MIDLet with tasks A and B subclass the MIDLet with Task A and override \"A\" wit

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

精彩评论

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