×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    29

    JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    I have a LWUIT-application which I also want to run on Blackberry phones. For this I use the approach from the LWUIT Demo App - common implementation is placed in a separate project (the base), there is 1 more separate project for MIDP which depends on the base, 1 other for RIM which also deps on the base. The project for RIM produces a native RIM application. In RIM's world it's called CLDC app or RIMlet. So, my application is not derived from MIDlet, but from UiApplication. See below.

    import net.rim.device.api.ui.UiApplication;

    public class MyRimlet extends UiApplication implements Runnable {

    Now the problem...
    I use some library. The class from that library needs lcdui's Display for its initialization (ref2 javax.microedition.lcdui.Display). I can get a ref2 Display if I have MIDlet. For this I can use Display.getDisplay(MIDlet m) method. But I don't have MIDlet since my app is derived from UiApplication.
    So, what should I do to initialize the class from external lib?

    Thanks for your help!
    Regards,
    Alexey

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,553

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    Have you asked on the RIM/BlackBerry developer forums? Beats me, but for some strange reason or another, I suspect that there might be more BlackBerry experts there than on an competitor's forums such as this one.

    http://supportforums.blackberry.com/.../blackberrydev

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    29

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    Quote Originally Posted by petrib View Post
    Have you asked on the RIM/BlackBerry developer forums? Beats me, but for some strange reason or another, I suspect that there might be more BlackBerry experts there than on an competitor's forums such as this one.

    http://supportforums.blackberry.com/.../blackberrydev
    Hi Petrib,

    Yes, you are right!
    I asked there also.
    I decided to ask here, since many mobile developers use LWUIT and develop applications for more than just 1 mobile platform.

    Regards,
    azakharo

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    try

    Android & BlackBerry Port by Thorsten Schemm - A native BlackBerry API port of LWUIT is available within the LWUIT incubator project source tree. (http://java.net/projects/lwuit-incubator/)

    refer to - http://www.pader-sync.com/lwuit-for-...d-android.html
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    29

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    Quote Originally Posted by im2amit View Post
    try

    Android & BlackBerry Port by Thorsten Schemm - A native BlackBerry API port of LWUIT is available within the LWUIT incubator project source tree. (http://java.net/projects/lwuit-incubator/)

    refer to - http://www.pader-sync.com/lwuit-for-...d-android.html
    I already use it in my application! Specifically, I use LWUIT_Blackberry_4_7_OrNewer.jar library from LWUIT 1.5.
    The question is how to get MIDP's lcdui Display when you use the port (you do not have a MIDlet).
    Correct me, if my understanding is wrong.

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    As you do not have Midlet, you can not get the instance of Midlet Display object.... please let us know what do you want to achieve using it ?.... we might have some workaround for it.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  7. #7
    Registered User
    Join Date
    Oct 2011
    Posts
    29

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    Quote Originally Posted by im2amit View Post
    As you do not have Midlet, you can not get the instance of Midlet Display object.... please let us know what do you want to achieve using it ?.... we might have some workaround for it.
    OK, I have a rich LWUIT application. One of the screens displays a map with markers. I use Nokia Maps API for that screen. I create MapCanvas object which needs lcdui's Display for its initialization (see its constructor).
    My app has 2 versions: MIDP and RIM. It is implemented exactly the same way as in the famous LWUIT Demo App and as I described before in this thread. In the MIDP version of my app I have the midlet object and have no problems with creating MapCanvas. In the RIM version I have different classes (API) and have no midlet. But I think that it is hidden somehow below that API and can be accessed. I am just unfamiliar with programming for Blackberry...

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: JavaME/LWUIT/Blackberry - how to get lcdui's Display in RIMlet?

    Quote Originally Posted by azakharo View Post
    OK, I have a rich LWUIT application. One of the screens displays a map with markers. I use Nokia Maps API for that screen. I create MapCanvas object which needs lcdui's Display for its initialization (see its constructor).
    My app has 2 versions: MIDP and RIM. It is implemented exactly the same way as in the famous LWUIT Demo App and as I described before in this thread. In the MIDP version of my app I have the midlet object and have no problems with creating MapCanvas. In the RIM version I have different classes (API) and have no midlet. But I think that it is hidden somehow below that API and can be accessed. I am just unfamiliar with programming for Blackberry...
    You wont get Midlet display in UI app; for RIM you may need to use Blackberry maps API...
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. JavaME/LWUIT: is there any appropriate map library?
    By azakharo in forum Mobile Java General
    Replies: 6
    Last Post: 2012-01-17, 04:14
  2. Lwuit application on Blackberry
    By rekha2103 in forum Mobile Java General
    Replies: 1
    Last Post: 2011-03-16, 12:16
  3. LWUIT Api in JavaME Application
    By narendar_discover in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2010-04-30, 08:40
  4. .ico file problem with javame and blackberry
    By nekinpatel in forum Mobile Java General
    Replies: 4
    Last Post: 2010-04-14, 06:29
  5. I want to display Marquee on a Canvas on Blackberry
    By abhsax1978@hotmail.com in forum Mobile Java General
    Replies: 1
    Last Post: 2008-08-01, 17:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×