IMlet and MIDlet

Hello

I don't understand what makes a way IMlet and MIDlet?

Thank you!

HI -.

I'm sure that I wore on this topic in one of the videos, but to summarize:

  • Earlier profiles for Java ME-based MIDP (Mobile Information Device Profile), designed for mobile devices (phones).  Applications developed using this profile are called MIDlets.
  • IMP - NG (Information Module Profile - Next Generation) is the successor of the MIDP, designed for embedded devices. Applications developed using this profile are called IMlets.
  • MEEP (ME embedded profile) is the latest incarnation of IMP - NG (as far as I know, nobody does refer to the application using this profile as MEEPlets.  Maybe he catches...)

That said, the abstract class that is used to create a code for all three of these profiles is javax.microedition.midlet.MIDlet.  So many people still refer to applications shipped as MIDlets.

For our needs, think IMlets and MIDlets as the same thing: just keeping in mind that the we is using more later/more embedded profile big.

HTH,

Tom

Tags: Java

Similar Questions

  • Push and Midlets

    I am trying to add push, via the Service of Blackberry Push notifications to my application already developed and productive with the midlets. As I can not instantiate a UIApplication on a moped, I thought to leave my "wake app" app on every push, using PushRegistry AMS software.

    Its posible to register to use the Blackberry Push Notification Service, at a very low level, using PushRegistry on a MIDlet application?

    Thank you

    Nico.

    Solved by some here at work, by adding this code. Post here if anyone can help.

    package test.javax.microedition.midlet;

    Javax.microedition.lcdui import. *;
    Javax.microedition.io import. *;
    Javax.microedition.midlet import. *;
    Import Java.util;
    import java. IO;
    Import net.rim.device.api.applicationcontrol.ApplicationPermissions;
    Import net.rim.device.api.applicationcontrol.ApplicationPermissionsManager;

    / public final class DynamicPushRegistry extends MIDlet
    {
    Data, we expect to receive.
    private static final String TEST_DATA = "this is just a test."
    private final static ApplicationPermissionsManager apm is ApplicationPermissionsManager.getInstance ();.

    public DynamicPushRegistry()
    {
    setPermission (ApplicationPermissions.PERMISSION_CROSS_APPLICATION_COMMUNICATION);
    setPermission (ApplicationPermissions.PERMISSION_BROWSER_FILTER);
    setPermission (ApplicationPermissions.PERMISSION_INTERNET);
    setPermission (ApplicationPermissions.PERMISSION_SERVER_NETWORK);
    setPermission (ApplicationPermissions.PERMISSION_APPLICATION_MANAGEMENT);
    }

    Signals of the MIDlet that he is entered in the active state.
    public void startApp()
    {
    Get the display for this MIDlet object.
    Display d = Display.getDisplay (this);

    Create and start a new WorkerThread.
    Thread t = new WorkerThread();
    t.Start ();

    Create a new alert.
    Alert alert = new alert ("start DynamicPushRegisry");

    Display the alert for 2 seconds.
    alert.setTimeout (2000);

    d.setCurrent (alert);
    }

    private class WorkerThread extends thread
    {
    public void run()
    {

    Get all the connections that have been registered with the PushRegistry
    for the current MIDlet suite.
    String [] connections = PushRegistry.listConnections (true);

    If (connections.length == 0)
    {
    Nothing is recorded, sign up for a connection.
    Try
    {
    Dynamically register a socket connection
    on port 50000.
    PushRegistry.registerConnection ("' socket: / /: 50000", ")
    "test.javax.microedition.midlet.DynamicPushRegistry,"
    "*");
    } catch (ConnectionNotFoundException e)
    {
    message (try ());
    } catch (ClassNotFoundException e)
    {
    message (try ());
    } catch (IOException e)
    {
    message (try ());
    }
    }
    on the other
    {
    A connection is already registered and data arrives.
    Extract the incoming data.
    fetchData (connections [0]);

    Stop to wait for data.
    message ("Done");
    }
    notifyDestroyed();
    }
    }

    Retrieves incoming data.
    Private Sub fetchData (connection String)
    {
    Try
    {
    Open the connection.
    Connection c = Connector.open (connection);

    If (ch. instanceof StreamConnectionNotifier)
    {
    Open an InputStream.
    StreamConnectionNotifier (StreamConnectionNotifier) SNA = c;
    StreamConnection sc = scn.acceptAndOpen ();
    InputStream input = sc.openInputStream ();

    Extract the data from the InputStream.
    StringBuffer sb = new StringBuffer();
    data from Byte [] = new ubyte [256];
    piece of int = 0;
    While (-1! = (chunk = input.read (data)))
    {
    SB. Append (new String (data, 0, chunk));
    }

    Close the InputStream and StreamConnection.
    Input.Close ();
    TCI Close();

    String s = sb.toString ();

    Test the data for validity.
    If not valid, an exception is thrown.
    Assert.assertTrue (TEST_DATA.equals (s),
    "Do not have an appropriate string:"+ s); ".

    Display the received data.
    message ("Received:" + sb.toString ());
    }
    } catch (IOException e)
    {
    message (try ());
    }

    }

    Display a message string to the user.
    Private Sub message (String msg)
    {
    Create a new alert with the message.
    Alert alert = new Alert (msg);

    Display the alert for 5 seconds.
    alert.setTimeout (5000);

    Display.getDisplay (this) .setCurrent (alert);
    }

    Reports the MIDlet to stop and go to the Pause State.
    public void pauseApp()
    {
    }

    Reports the MIDlet to terminate and move to the State of destruction.
    Unconditional, when set to true. The MIDlet must cleaning and release
    all of the resources. Otherwise, the MIDlet can raise a
    MIDletStateChangeException to indicate that he does not want to be
    destroyed at this time.
    public void destroyApp (boolean unconditional)
    {
    }

    private Boolean setPermission (int permission) {}

    Boolean updatedPermissions = false;
    ApplicationPermissions ap = apm.getApplicationPermissions ();
    If (ap.containsPermissionKey (permission)) {}
    int eventInjectorPermission = ap.getPermission (permission);

    If (eventInjectorPermission! = ApplicationPermissions.VALUE_ALLOW) {}

    ap.addPermission (permission);
    updatedPermissions = apm.invokePermissionsRequest (ap);
    }
    } else {}
    ap.addPermission (permission);
    updatedPermissions = apm.invokePermissionsRequest (ap);
    }

    Return updatedPermissions;
    }
    }

    Throws IllegalStateException with the provided error message.
    last class Assert
    {
    Assert() private
    {
    }

    public static public Sub assertTrue (Boolean exp, String failmsg)
    {
    If (! exp)
    throw new IllegalStateException (failmsg);
    }
    }

  • Update Midlet

    Hello

    I am updating mi automatly midlet.

    So, if a new version if found I use platformRequest (urlMidlet);

    Mi problem is:

    -If I put the url of the jad file I get this error:

    incompatibility of double attribute attribute 905 incompatibility descriptor: "MIDlet-Version" when trying to install I watch in the file jad and MIDlet-Version appear only once. "

    -If I put the url of the jar file I get this error:

    907 invalid JAR illegal host string: starts with ' / '.

    I compile my midlet with Wireless ToolKit.

    Thank you

    Hello

    Problem solved just remove the MIME for pot and work very well.

    Cali

  • The issues of packaging and BlackBerry APIs

    I downloaded the 4.7.0 eclipse plugin and when I create a project, the Properties dialog box tells me that I can choose the type of project, namely in the following list:

    1 CLDC

    2 Midlet

    3 library

    What is the difference between CLDC and Midlet?

    I'm guessing that J2ME and Blackberry native apps are grouped under "CLDC applications."

    I am very intrigued by #3. I come from a background of Google Android, so I'm currently looking for a way to write services, shareable pieces of code that several Apps Blackberry can I use (e.g., Single Sign-On authentication server). This is what a library is for?

    Kind regards

    G

    CLDC - who uses the entry point of the main method.

    MIDlet - comparable to midlet development and life cycle.

    Libray - third-party API can be created as Libray and install on the device.

    Check this link, you will get Developers guide more awareness.

  • Q:PeripheralTypeNotSupportedException on GPIO18

    Hello
    I just started to tinker around with Oracle Java ME on my raspberry PI 3.3 and have lots of fun and a question that I don't understand or how to fix.

    I try to turn on or turn off some lights just to learn more about the DAAPI, etc.. My code looks like this (Yes, I know it can be written better, but I'm learning about the DAAPI for now):
    package rpiblinky;
    
    import com.oracle.deviceaccess.PeripheralManager;
    import com.oracle.deviceaccess.PeripheralNotAvailableException;
    import com.oracle.deviceaccess.PeripheralNotFoundException;
    import com.oracle.deviceaccess.PeripheralTypeNotSupportedException;
    import com.oracle.deviceaccess.gpio.GPIOPin;
    import java.io.IOException;
    import javax.microedition.midlet.*;
    
    /**
     * @author atael
     */
    public class IMlet extends MIDlet {
    
        private static final String LED1_NAME = "GPIO23";
        private static final String LED2_NAME = "GPIO24";
        private static final String LED3_NAME = "GPIO25";
        private static final String LED4_NAME = "GPIO18";
        private LED led1;
        private LED led2;
        private LED led3;
        private LED led4;
        boolean isStarted = false;
    
        public void startApp() {
            isStarted = true;
            System.out.println("*********************************");
            System.out.println("*   LED GPIO Sample (RPI Blinky)*");
            System.out.println("*********************************");
    
            led1 = new LED(LED1_NAME);
            led2 = new LED(LED2_NAME);
            led3 = new LED(LED3_NAME);
            led4 = new LED(LED4_NAME);
            try {
                led1.open();
                led2.open();
                led3.open();
                led4.open();
                while (true) {
                    led1.changeValue();
                    Thread.sleep(50);
                    led2.changeValue();
                    Thread.sleep(50);
                    led3.changeValue();
                    Thread.sleep(50);
                    led3.changeValue();
                    Thread.sleep(50);
                    led2.changeValue();
                    Thread.sleep(50);
                    led1.changeValue();
                    Thread.sleep(50);
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (PeripheralTypeNotSupportedException ex) {
                ex.printStackTrace();
            } catch (PeripheralNotFoundException ex) {
                ex.printStackTrace();
            } catch (PeripheralNotAvailableException ex) {
                ex.printStackTrace();
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
    
        }
    
        public void pauseApp() {
        }
    
        public void destroyApp(boolean unconditional) {
            try {
                isStarted = false;
                led1.close();
                led2.close();
                led3.close();
                led4.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (PeripheralNotAvailableException ex) {
                ex.printStackTrace();
            }
        }
    
        public class LED {
    
            private String name;
            private GPIOPin led;
    
            LED(String name) {
                this.name = name;
            }
    
            public void open() throws IOException, PeripheralTypeNotSupportedException,
                    PeripheralNotFoundException, PeripheralNotAvailableException {
                led = (GPIOPin) PeripheralManager.open(name, GPIOPin.class, null);
            }
    
            public void changeValue() {
                try {
                    boolean prevState = led.getValue();
                    led.setValue(!prevState);
                } catch (IOException ex) {
                    ex.printStackTrace();
                } catch (PeripheralNotAvailableException ex) {
                    ex.printStackTrace();
                }
            }
    
            public void close() throws IOException, PeripheralNotAvailableException {
                if (led != null) {
                    led.setValue(false);
                    led.close();
                }
            }
        }
    }
    But when I run the application I the following exception is thrown:
    *********************************
    *   LED GPIO Sample (RPI Blinky)*
    *********************************
    [INFO] [UNKNOWN] gpio.c line 636: Try to open pin 23 on port 0 with direction 1
    [INFO] [UNKNOWN] gpio.c line 727: GPIO pin 23 open successfully done
    [INFO] [UNKNOWN] gpio.c line 636: Try to open pin 24 on port 0 with direction 1
    [INFO] [UNKNOWN] gpio.c line 727: GPIO pin 24 open successfully done
    [INFO] [UNKNOWN] gpio.c line 636: Try to open pin 25 on port 0 with direction 1
    [INFO] [UNKNOWN] gpio.c line 727: GPIO pin 25 open successfully done
    [AMS-TRACE] MIDlet:RPIBlinky status=2
    com.oracle.deviceaccess.PeripheralTypeNotSupportedException
     - com.oracle.deviceaccess.gpio.impl.GPIOPinImpl.openPinWithId0(), bci=0
     - com.oracle.deviceaccess.gpio.impl.GPIOPinImpl.open(), bci=57
     - com.oracle.deviceaccess.gpio.impl.GPIOManager.createPin(), bci=37
     - com.oracle.deviceaccess.gpio.impl.GPIOManager.openPin(), bci=12
     - com.oracle.deviceaccess.gpio.impl.GPIOManager.open(), bci=17
     - com.oracle.deviceaccess.impl.PeripheralManagerImpl.open(), bci=66
     - com.oracle.deviceaccess.PeripheralManager.open(), bci=4
     - rpiblinky.IMlet$LED.open(IMlet.java:105)
     - rpiblinky.IMlet.startApp(IMlet.java:44)
     - javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
     - com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
     - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=229
     - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
     - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
     - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=121
     - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
    [AMS-TRACE] MIDlet:RPIBlinky status=1
    But if I remove the GPIO18 (led4) from my code, it performs very well. Why this would not work for me? GPIO18, GPIO23, GPIO24 and GPIO25 looks the same in the documentation:
    direction=GPIOPinConfig.DIR_OUTPUT_ONLY
    mode=GPIOPinConfig.MODE_OUPUT_PUSH_PULL
    trigger = ignored
    initValue=false
    I don't know where to start looking, what I'm doing wrong here?

    Thank you
    Andy

    Published by: a Tael on March 15, 2013 16:02

    Hello

    You must add the "deviceaccess.gpio.pin18.port = 0" line to the file jwc_properties.ini in the bin directory.

    This bug in the release configuration.

  • jad issue related to dependencies...

    Hello

    A very specific question...

    I have two projects, a cldc app and a library application, with dependencies on the other one. If I install it in my device using alx, there is no problem providing that I have app.cod, library.cod and app.alx in the same folder.

    I'm not sure, and I can't test it now, what if he's going to have the same behavior using .jad file

    As I see it inside the jad, there is not any reference to library.cod, as it happened inside the app.alx. There is only a dependency of the library module module. This makes me think that I need to have my library installed in the device before trying to install my application.

    Am I wrong? Is it possible to install the library and the app with a single jad?

    Thanks in advance

    Hello

    You have an application named SampleApplication , and two modules in library named MyLibrary1 and MyLibrary2.

    You want to do OTA SampleApplication with SampleApplication.jad file that automatically installs the two libraries with your application.

    Follow these steps:

    1 build applications. You will get 3 cod and 3 files jad

    2. open the MyLibrary1.jad file in Notepad and copy the values of RIM-COD-URL:, RIM-COD-SHA1:and RIM-COD-Dimensions: the file and save it in a text saying temp.txt file.

    3. open the MyLibrary2.jad file in Notepad and copy RIM-COD-URL values:, RIM-COD-SHA1:and RIM-COD-size: the file and save it in temp.txt.

    4 rename the MyLibrary2.jad file temp.txt as values RIM-COD-URL-1:,RIM-COD-SHA1-1:and RIM-COD-size-1:

    5 open SampleApplication.jad file in Notepad and rename values such as RIM-COD-URL-2:, RIM-COD-SHA1-2:and RIM-COD-size-2:

    6 copy temp.txt to SampleApplication.jad values

    7. remove MIDlet-Jar-Size: and MIDlet-Jar-URL: of SampleApplication.jad properties

    8 copy all SampleApplication.jad file and .cod files in a single directory

    9. your SampleApplication.jad file is now ready for OTA with your library modules

    Example of a .jad file

    Manifest-Version: 1.0
    MIDlet-Version: 01.00.00
    MicroEdition-Configuration: CLDC-1.1
    RIM-COD-Module-Dependencies: net_rim_cldc,MyLibrary1,MyLibrary2
    RIM-MIDlet-Flags-2: 0
    RIM-MIDlet-Flags-1: 3
    RIM-COD-Module-Name: SampleApplication
    MIDlet-Name: SampleApplication
    RIM-COD-Creation-Time: 1236762075
    MIDlet-1: SampleApplication,images/sampleImage.png,
    MIDlet-Description: Sample Application for Blackberry
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Vendor: JobinCAntony
    RIM-COD-URL: MyLibrary1.cod
    RIM-COD-SHA1: 8f 1f e6 03 c5 b7 82 18 df d0 54 12 af ab 61 41 12 eb 46 ca
    RIM-COD-Size: 24852
    RIM-COD-URL-1: MyLibrary2.cod
    RIM-COD-SHA1-1: cf 38 97 fb f7 4d e9 3a db 6b 07 1a ad da 9e 92 31 ec bd f2
    RIM-COD-Size-1: 1844
    RIM-COD-URL-2: SampleApplication.cod
    RIM-COD-SHA1-2: a7 5c d8 ed 76 c3 4e d9 17 0b 4a 23 6b 2f c4 1c 85 e4 2c f4
    RIM-COD-Size-2: 5142
    

    You can test it with the device Simulator.

    (1) setting up a Tomcat server, copy these files into folder webapps of tomcat

    (2) start MDS Simulator

    (3) boot device Simulator and access the SampleApplication.jad file of your application.

    (4) download

    JOBIN

  • Use of rms in an App CLDC?

    I'm working on an application for which I am considering using the javax.microedition.rms for persistent storage components.

    Details;

    -OS 4.6

    -configured as a CLDC application rather a MIDlet

    -Eclipse JDE component pack 4.6.0.16

    Is there something in the chain of Eclipse or OS runtime environment tools that prevent using rms in an app CLDC?

    Thanks in advance!

    You can use the recordstore RMS in a BlackBerry CLDC application.  For most, J2ME and RIM API can be mixed between MIDlets and CLDC of BlackBerry applications.  The meanings are only base (user interface) Application and MIDlet classes and user interface classes.

  • Sharing data between Applications

    I need to be able to share documents between different applications such as straight JAVA applications and MIDlets.  I went and wrote the code using the store only to find out that it does not work between applications. I saw something on the RuntimeStore but finds that it is not persistent (you lose the data on reboot). I think it is a severe limitation.  Are there other options?

    Thank you!

    You can use the persistent objects to back up and share data with other applications also.

    Give a look to this developer doc. Section "persistent data storage.

    http://NA.BlackBerry.com/eng/deliverables/608/BlackBerry_Application_Developer_Guide_Volume_2.PDF

  • Storm - how MIDP canvas can capture Screeen.touchEvent (message TouchEvent)?

    Hi all

    I tried to capture TouchEvent.CLICK with an application that uses the MIDP canvas: alias for the end user by pressing the touch screen - notice I am referring to the same 'click' which occurs when the user selects the "Browser" icon in the main screen and pushes down the entire screen to make it click.

    I can receive and process all the pointer events from MIDP perfectly (pointerPressed, pointerReleased and pointerDragged).

    In the past, we were able to capture the special keys by using the following:

    class AppCanvas extends Canvas implemens TrackwheelListener, {KeyListener

    public AppCanvas() {}

    ...

    If (Ui.getUiEngine () .getActiveScreen ()! = null) {}
    Ui.getUiEngine () .getActiveScreen () .addTrackwheelListener (this);
    Ui.getUiEngine () .getActiveScreen () .addKeyListener (this);
    }
    }

    {} public boolean touchEvent (TouchEvent msg)

    is never called

    ...

    }

    Canvas.keyPressed and keyReleased would get a few keys, so that the listeners TrackwheelListener and KeyListener would get others.

    However, it seems like there is no way to make it Screen.touchEvent (message TouchEvent) except if you extend the Screen class, which is something that we do not expect to do - since our application uses MIDP canvas.

    Here's the main problem in terms of feeling of native BB app and midlet:

    A storm for the end user would expect that touching a UI widget will assign the focus but who would NOT fire the action of this widget. Instead, the end user expects that the action of this widget would fire when the widget is "clicked".

    Obviously, there is no way to tell a 'touch' of a "clicked" using canvas MIDP pointer-events.

    Any suggestions?

    Thank you

    I come to know BlackBerryCanvas of this thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=8345

    Why a Midlet would have problems using TrackwheelListener?

  • More small font of J2ME on Blackberry "BOLD"? small proportional, plain?

    Hello, what is the smallest police achievable J2ME on the Blackberry Bold? I ask this, because

    style = "plain" face = "proportional" size = "small".

    seems to be already very large and very bold? Is there a way to get a smaller font, without leaving the environment "J2ME"?

    I would first like to say Java and GNU license gave me a very big heart. This whole community has helped me tremendously to learn how to code, and give in return is the least I could do. I hope that the community in turn help me when I reached the rough places in the future. Don't forget I've been working on this code and it took me hours of exhaustian and works well and I am now it give for free, so please do the same for others. It is the idea not the code that makes money.

    That said, I present to you:

    How to solve the problem of police of blackberry in 5 minutes of coding a moped.

    (please link to this topic as much as possible)

    Step 1: Analyze what is happening between the 2 separate API and why it is so difficult to change fonts.

    Step 2: Ask how are packages come into conflict with each other?

    Step 3: Ask you... can I change the font in general?

    Step 4: Run the text following preference somewhere in the constructor... and somewhere off of the paint method.

    final FontFamily fontFamily[] = FontFamily.getFontFamilies();
    
        font10 = fontFamily[0].getFont(FontFamily.CBTF_FONT, 16);
        Font.setDefaultFont(font10);
    

    Keep in mind that you must have the good net_rim_api.jar installed (or the appropriate folder and configuration via the Toolbox correctly)... and in my case, the following code is at the top of my class file and I use an external library on my toolbox.

    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.FontFamily;
    

    now, it's just a natural function used for user interface of blackberry and midlets applications using the Blackberry net_rim_api.jar as an external module.

    Those of you who are running a blackberrycanvas or a touch event for the blackberry storm should automatically know what I speak. Send me an Email if you are at all confused, that I'll get back to you.

    Anyway go...

    Run this natural function and go ahead and test it using a common g.drawString ("Hello World", 20,20, g.TOP | g.LEFT);

    Here you should notice that your policy has changed the font specified by Font.setDefaultFont (font10);

    This is because the static method changes all fonts... including police BlackBerryMenu I might add.

    Then, perform the following steps:

    Step 5: Ask yourself... but what happens if I separated from the places that need separate policies?

    Good question... I had this one for awhile and found a brilliant answer.

    Note the following points:

    Font BBFont = javax.microedition.lcdui.Font.getDefaultFont();
    

    Here is what just happened, the above code catches the current default font defined for the lcdui police. Or in our case, the police of the Midlet. As I looked into it... There is no method to create a nice font that corresponds to the blackberry one again... but after calling

    Font.setDefaultFont (font10);

    in this case the police is referenced as...

    net.rim.device.api.ui.Font

    It amends the police for both the system and the

    javax.microedition.lcdui.Font

    It is signifigant for us because now, because we can store the new settings, we can make the magic happen.

    Step 6: Perform magic with the fonts.

    Store any desired blackberry font using the following...

    final FontFamily fontFamily[] = FontFamily.getFontFamilies();
    
        Font font10 = fontFamily[4].getFont(FontFamily.CBTF_FONT, 16);
        Font.setDefaultFont(font10);
        javax.microedition.lcdui.Font bbfont = javax.microedition.lcdui.Font.getDefaultFont();
    

    do not hesitate to make the police a variable, you can reference from the whole class... or keep it in another class if you wish.

    then do this in the paint method...

    protected void paint(Graphics g){
    
    g.setFont(bbfont);
    g.drawString("Hello World",20,20,g.TOP|g.LEFT);
    
    }
    

    You should find that the police has changed very nicely your new font... here make a function out of it, change the fonts to the top.

    Step 7: bask in the glory of magic.

    So you tell me if I call Font.setDefaultFont (myfont);

    and I use a blackberry police... it will change the current font... then I can go then enter this police and store it and then call at a later date, and it will use this font?

    I mean that Times New Roman!

    Well, if they have Times New Roman can be my guest...

    but later I want to black Ariel...

    Yes same process be my guest...

    But man according to the forums, I can't do that...

    Yes, and you can quote me on this one there according to JavaLover53 you can use what font you want, as long as you do the police first... and it is strongly recommended that you do outside the paint function and you store fonts in one easy to access place in memory, namely the Summit also recommended

    import net.rim.device.api.ui.Font;import net.rim.device.api.ui.FontFamily;import javax.microedition.lcdui.*;public class BBFontCanvas extends Canvas {javax.microedition.lcdui.Font timesnewroman;javax.microedition.lcdui.Font bbalphasans;
    
    public BBFontCanvas(){  final FontFamily fontFamily[] = FontFamily.getFontFamilies();
    
       font10 = fontFamily[4].getFont(FontFamily.CBTF_FONT, 16); Font.setDefaultFont(font10);  bbalphasans = javax.microedition.lcdui.Font.getDefaultFont();
    
    //have fun and make another font...      font10 = fontFamily[0].getFont(FontFamily.CBTF_FONT, 20); Font.setDefaultFont(font10);      timesnewroman = javax.microedition.lcdui.Font.getDefaultFont();}
    
    public void changeFont(int fontnum){
    
    //i figure from here you can do a switch statement to change the font...//or idk perhaps just do it by fontnum//you guys gotta code that up haha.//it'll probably look like this though...   //public void changeFont(int fontnum,javax.microedition.lcdui.Font thefont){}//or maybe you wanta return a new font so....//public javax.microedition.lcdui.Font getNewFont(int fontnum,javax.microedition.lcdui.Font thefont){}
    
    //then make like a switch statement, and then call this to establish the fonts you want in advance and store //these fonts use them for classes you have for classes you've made like void setFont(Font myfont); <--- in//that case your midlet class never even heard of the blackberry font so you're passing a normal lcdui font.//anyways point being as long as g.setFont(myfont); has the proper font this stuff works. :-)
    
     font10 = fontFamily[2].getFont(FontFamily.CBTF_FONT, 16); Font.setDefaultFont(font10);  bbalphasans = javax.microedition.lcdui.Font.getDefaultFont();}     public void paint(Graphics g){     g.setColor(0,0,0);     g.fillRect(500,500);     g.setColor(255,255,255);
    
    //set the font to bbalphasans or in this case fontFamily[4] from the constructor...     g.setFont(bbalphasans);     g.drawString("Hello World",20,20,g.TOP|g.LEFT);     }}
    

    and for those of you who don't like comments... just look at this code instead...

    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.FontFamily;
    import javax.microedition.lcdui.*;
    public class BBFontCanvas extends Canvas {
    javax.microedition.lcdui.Font timesnewroman;
    javax.microedition.lcdui.Font bbalphasans;
    
    public BBFontCanvas(){
        final FontFamily fontFamily[] = FontFamily.getFontFamilies();
    
        font10 = fontFamily[4].getFont(FontFamily.CBTF_FONT, 16);
        Font.setDefaultFont(font10);
        bbalphasans = javax.microedition.lcdui.Font.getDefaultFont();
    
          font10 = fontFamily[0].getFont(FontFamily.CBTF_FONT, 20);
        Font.setDefaultFont(font10);
          timesnewroman = javax.microedition.lcdui.Font.getDefaultFont();
    }
    
    public void changeFont(int fontnum){
    
        font10 = fontFamily[2].getFont(FontFamily.CBTF_FONT, 16);
        Font.setDefaultFont(font10);
        bbalphasans = javax.microedition.lcdui.Font.getDefaultFont();
    }
         public void paint(Graphics g){
         g.setColor(0,0,0);
         g.fillRect(500,500);
         g.setColor(255,255,255);
    
         g.setFont(bbalphasans);
         g.drawString("Hello World",20,20,g.TOP|g.LEFT);
         }
    }
    

    in any case this is my tutorial police and I currently have surprising good labour code. I am so happy to finally use the blackberry fonts and it proves just everyone and everything that can make an application user interface, unless of course the components made... a midlet can do as well on a blackberry.

    They don't call it Java for nothing, if you know the ins and outs, it's like a cup of coffee it'll get you WIRED!

    Take advantage and ask me questions if you cannot get the fonts you want. This should solve any problems for those of you who have worked hard on your midlets and problems of police... and for those of you who are lazy... Simply change the default system font, and all will be the police.

    -JLover53

  • Storm MMAPI

    Hello

    We develop a J2ME application that is rich media and includes (picture/audio/video) media via MMAPIs.

    V4.7 Blackberry Software Guide, it is understood that MMAPIs are supported since version 4.7 go. This means that we can now record video, photo, audio within the Java using MMAPIs application on Blackberry devices with the 4.7 version software.

    My questions are-

    1. peripheral does Blackberry Storm allows applications to record all three types of media via MMAPI (JSR-135)?

    2. has someone at - he tried video recording via MMAPI on storm device? In the affirmative, please let me know your experience.

    Thank you

    Marie Hélène

    Thank you... I could solve the problem by adding little logic pauseApp() and midlet startApp().

    The thing is, when the camera is started, the midlet is suspended and called pauseApp(). When the camera is closed, midlet is taken over by startApp() calling again.

  • JAD params of the reading of the JAD file that is changed after the cod file is built?

    Hello

    We have a requirement in which, you must change the jad file, after the cod file is generated.

    But when I try to do is not able to read the newly added params to MIDlet.getAppProperty() . He can read the jad attributes that were there in the jad file before creating the cod file.

    Example:

    existing JAD has "KeyA" whose value is "A." Now package for the project and generate the blah.cod file

    Add a parameter more "KeyNew" with the value "ValueNew.

    Print the source MIDlet.getAppProperty("KeyA") andMIDlet.getAppProperty("KeyNew")

    Step 1. Existing.jad

    KeyA: A.

    Step 2. Build the cod

    Step 3. Add another parameter to Existing.jad

    KeyA: A.

    KeyNew: ValueNew

    Step 4. Existing.jad of charge using javaloader.

    load Javaloader u Existing.jad

    Step 5. Run the application

    Actual output: it prints only a. and not ValueNew

    I read that this is possible in JDE 4.3 + and I'm working on JDE 5.0

    Help, please.

    ~ Joey

    Apparently it only works if we install the Jad with Javaloader file. Having an installation OTA of the Jad file works.

  • How to resize the viewport on CTS-1300?

    We have a number of CTS-1300 that work great, however when sharing PC displays during a call to the PC screen appears in a small window at the bottom of the screen of the CTS, which is often too small to be seen by the participants.

    Is it possible to increase the size of the window to close (or total) presentation full screen while in a call?

    You you can use the button to display SWAP in ctrl of PiP. This will make the presentation appears on the top screen of the video image. You can toggele back to a larger video image. Must use 1.7.1 and MIDlets. Hope this helps.

    http://www.Cisco.com/en/us/products/ps8332/products_user_guide_list.html

    V/R,

    JD King

  • Alternate implementation of the entry place OTA

    I have an alternative entry with two files application. The main cod is another entry and then a library. I can't get the library to install ota using this description of jad:

    MIDlet-1: MyApp,img/Logo.png,
    
    RIM-COD-Module-Name-1:  MayApp
    RIM-COD-Size-1: 53744
    RIM-COD-URL-1: url/ota/MayApp.cod
    
    RIM-COD-Module-Name-2:  MyLib
    RIM-COD-Size-2: 32836
    RIM-COD-URL-2: url/ota/MyLib.cod
    
    MIDlet-Name: MyApp
    MIDlet-Vendor: My Co.
    MIDlet-Version: 4.20.01
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0
    

    There are a few lines in the main application jad file origin I do not understand:

    MIDlet-2:, auto-start
    MIDlet-1: MayApp

    It seems to be linked to the implementation of another entry, but in my jad ota I already list 1 MIDlet and MIDlet-2.

    can anyone help on this?

    some trial and error eventually got it to work.

  • Lesson 1 Quiz - Question about notifyDestroyed()

    If notifyDestroyed() is called the last statement in startApp(), what is the result?  According to the quiz, the AMS will call destroyApp() and IMlet and all its threads is destroyed.  According to the javadocs MEEP, a call to notifyDestroyed() does NOT cause the AMS to call on the IMlet destroyApp().  What Miss me?

    Here is the quote of: http://docs.oracle.com/javame/8.0/api/meep/api/index.html

    "

    public final void notifyDestroyed()

    Used by an application to notify the management software application that it has reached the State destroyed . The application management software does not call for the application of destroyApp method and all resources held by the application will be eligible for reclamation. The application must have made the same operations (cleaning, freeing up resources, etc.) that it would have if the destroyApp method has been called.

    "

    Thank you

    Hello-

    You are not missing anything - the quiz is wrong. I'll make the correction for the quiz.

    Tom

Maybe you are looking for

  • HP_TOOLS (D)?

    Sorry if this post is in the wrong place. But my computer has a drive d, with all these things inside this sick list below, my computer continuously tries to store the backups in the small space that remains even if I turned off twice now. I thought

  • I change the window of my laptop HP 635 to Windows 7 ultimate and can not find drivers drivers

    I change the window of my laptop HP 635 for window 7 ultimate and impossible to find some drivers. The drivers are listed below with their hardware ID Ethernet ControllerPCI\VEN_10EC & DEV_8136 & SUBSYS_3577103C & REV_05PCI\VEN_10EC & DEV_8136 & SUBS

  • Virus of blackBerry Smartphones

    Hello, I am in the Netherlands. Can you help me before I buy a new phone? My problem was: the 'e' on my BB 8520 curve caracter didn't work. I tried to reset and update the bb and after about a week, it worked all of a sudden, for about a week. but no

  • Can I please any help to find AppData?

    I have recently changed/updated in Windows XP Professional to Windows 7 Professional, but have been finding a lot of things I need to change. One is to create a Quick Launch toolbar and the second is edit/control ads in my Start menu. These two are f

  • Write a stored procedure to insert records in a database to a different database

    I have two databases A and B and I have to insert some data in the table of A database to the database of B. So I (TWO TABLE NAMES SHOULD BE TABLE1 (A) AND table 2 (B))PROCEDURE XYZBEGININSERT SCHEMA_NAME. TABLE2SELECT (COLUMN1COLUMN2,...)