MicroEmulator

Posted on 2007-04-02 02:30 笨蛋啊帆 阅读(453) 评论(0)  编辑  收藏

Application demonstration in web browser applet

Your application should run without any changes inside applet.

    * Keep it in mind that if your j2me application requires HTTP access the applet must be signed. By default the applet will only communicate with the host the applet came from (your website).
    * Applet do not allow calls to System.getProperty();

Embedding applet into html page

MicroEmulator comes with three differend Skins:

    * Default 176x220 Full Screen and 176x176 Normal Canvas, Skin 226x471.
    * Minimum 128x128 Full Screen and 128x96 Normal Canvas, Skin 157x285. minimum.jar
    * Large 240x320 Full Screen and 240x266 Normal Canvas, Skin 292x618. large.jar

Html fragment example for Default device:

<applet code="org.microemu.applet.Main"
                width=226 height=471 archive="me-applet.jar,(MIDlet application jar)">
        <param name="midlet" value="(MIDlet application main class)">
</applet>

    * To support Nokia UI nokiaui.jar should be included in the archive attribute.
    * To support Siemens API siemensapi.jar should be included in the archive attribute.

There is additional parameter in the applet definition tag if you want to start the applet with device other than the default one:

  <param name="device" value="(device main class or device.xml)">

    * Minimum phone included in distribution is org/microemu/device/minimum/device.xml
    * Minimum phone with mouse and color is org/microemu/device/minimum/device-color.xml
    * Large phone is org/microemu/device/large/device.xml

Remember to include the new device jar into the applet archive tag

    * minimum phone included in distribution is packaged inside minimum.jar
    * large phone included in distribution is packaged inside large.jar

Example for SimpleDemo MIDlet, Nokia UI support and Minimum device:

<applet code="org.microemu.applet.Main"
                width=157 height=285 archive="me-applet.jar,nokiaui.jar,minimum.jar,simpledemo.jar">
        <param name="midlet" value="org.microemu.midp.examples.simpledemo.SimpleDemo">
        <param name="device" value="org/microemu/device/minimum/device.xml">
</applet>

Example for SimpleDemo MIDlet and Minimum device with mouse and color:

<applet code="org.microemu.applet.Main"
                width=157 height=285 archive="me-applet.jar,minimum.jar,simpledemo.jar">
        <param name="midlet" value="org.microemu.midp.examples.simpledemo.SimpleDemo">
        <param name="device" value="org/microemu/device/minimum/device-color.xml">
</applet>

Example for SimpleDemo MIDlet and Large Skin:

<applet code="org.microemu.applet.Main"
                width=292 height=618 archive="me-applet.jar,large.jar,simpledemo.jar">
        <param name="midlet" value="org.microemu.midp.examples.simpledemo.SimpleDemo">
        <param name="device" value="org/microemu/device/large/device.xml">
</applet>


只有注册用户登录后才能发表评论。


网站导航:
 

posts - 51, comments - 17, trackbacks - 0, articles - 0

Copyright © 笨蛋啊帆