This project includes a simple demo showing integration between the Lightstreamer JavaScript Client Library and Cordova.
This demo displays real-time market data for a few stocks generated by a feed simulator and is based on Basic Stock-List Demo.
This project shows how is it possible to integrate the JavaScript Client API for Lightstreamer into Cordova, in order to quickly create mobile apps embedding real-time web technologies.
The demo can be built by following these steps:
- Download and install Node.js.
- Get the
lightstreamer.min.js
file from npm or unpkg and put it in the folderwww/js
of the demo. - Install the cordova module by using the command
npm install -g cordova
- Run the command
cordova build
to build the project for the iOS and Android platforms - Open the folder
platforms/android
in Android Studio to run the Android demo - Open the project
platforms/ios/StockListDemo.xcworkspace
in Xcode to run the iOS demo
The demo is configured to connect to the address https://push.lightstreamer.com
. If you need to target a different Lightstreamer server, please search this line:
var lsClient = new Lightstreamer.LightstreamerClient("https://push.lightstreamer.com","DEMO");
in www/js/index.js
and change it accordingly.
- Lightstreamer - Stock-List Demos - HTML Clients
- Lightstreamer - Basic Stock-List Demo - Flutter
- Lightstreamer - Basic Stock-List Demo - React Native
- Lightstreamer - Basic Stock-List Demo - Electron
-
Compatible with Lightstreamer Web Client SDK 9.0 and Lightstreamer Server 7.4.
-
For a version of this example compatible with Lightstreamer SDK for Web Clients version 7.x or earlier, please refer to this tag.