This project contains a full example of a Midlet Java application that employs the Lightstreamer JAVA ME client library
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
res
src/javamedemo/midlet
.gitattributes
.gitignore
LICENSE
README.md
screen_midlet_large.png
screen_stockrtmidlet.png

README.md

Lightstreamer - Basic Stock-List and Round-Trip Demo - Java ME Client

This project contains a full example of a Midlet Java application that employs the Lightstreamer JAVA ME client library.

Live Demo

screenshot

View live demo

Details

This Java midlet contains two different screens: one with three stock quotes from the Lightstreamer - Stock-List Demos - HTML Clients, the other with four items from the Lightstreamer - Round-Trip Demo - HTML Client. This app uses the Java ME Client API for Lightstreamer to handle the communications with Lightstreamer Server.

You will see the yellow flashing cells of the Stock-List Demos. Use the Option menu to switch to the other demo, where you can see the values of some items of the Round-Trip Demo updated in real-time. To publish new values, use the Option menu.

You can open the Lightstreamer - Round-Trip Demo - HTML Client on a PC browser and see the values synchronized with the mobile phone.

Build

If you want to skip the build and deploy processes of this demo, please note that you can click the image or link above to download a MIDP 2.0 .jad file to your phone. As an alternative, point your mobile browser to the URL, to choose between .jad and .jar: http://demos.lightstreamer.com/midlet/ . Once installed on your phone, run the midlet, allow the network connections, choose the access point id prompted, and wait for the connection to be established (as shown in the top green bar).

Otherwise, if you want to procede with the compilation of own version of this demo, please consider that this example is comprised of the following folders:

  • src
    Contains the sources to build the java application.

  • res
    Contains the images needed to the demo.

  • lib
    Drop here the ls-j2me-client.jar from the Lighstreamer SDK for Java ME Clients, to be used for the build process and execution.

Deploy

By the current configuration, specified in LightstreamerDemoMidlet.java and used by the provided precompiled files; the demo tries to connect to the demo server currently running on Lightstreamer website. The demo can be reconfigured and recompiled to connect to the local installation of Lightstreamer Server. Only the host name and the port number have to be changed in the source code. The example requires that the QUOTE_ADAPTER and ROUNDTRIP_ADAPTER have to be deployed in your local Lightstreamer server instance; the LiteralBasedProvider is also needed, but it is already provided by Lightstreamer server.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer Java ME Client API v. 3.2.1 or newer.
  • For Lightstreamer Allegro (+ Java ME Client API), Presto, Vivace.