Git Product home page Git Product logo

lightstreamer-example-stocklist-client-xamarin's Introduction

Lightstreamer -Basic Stock-List Demo - Xamarin Client

This project contains a demo application showing the integration between the Lightstreamer .Net Standard Client library and Xamarin cross-platform mobile application development tool.

Demo ScreenShot

Details

This demo displays real-time market data for six stocks generated by a feed simulator and is based on Basic Stock-List Demo.
This project shows how is it possible to integrate the .Net Standard Client API for Lightstreamer into a Xamarin project, in order to quickly create cross-platform mobile apps embedding real-time technologies.

Dig the Code

  • App.xaml (and App.xaml.cs) is the main application file; it contains application event handling code (application start, sleep, resume, etc.).
  • MainPage.xaml (and MainPage.xaml.cs) is the main page of the app. Consists in a simple table containing the last price of six stocks updated in real-time (simulated); clicking or tapping into one of them open the Details page.
  • DetailsPage.xaml (and DetailsPage.xaml.cs) is the Details page of the app and contains details info of a stock (Name, Last Price, Last Time, Max, Min, Best Bid, Best Ask, Change %), also all this information is real-time updated.
  • AboutPage.xaml and (AboutPage.xaml.cs) is tha About page and contains a brief introduction to the demo.
  • RTFeed.cs class acts as a bridge between the pages and the Lightstreamer Client library, in order to subscribe the necessary Items and collect all updates in real time. Indeed this class is used as BindingContext for the visual Xamarin widgets. This class also takes care of opening and closing the connection to the Lightstreamer server.
  • TestConnectionListener.cs this class implements the ClientListener interface of Lightstreamer Client API, and receives all the information about changes in the status of the connection with the Lightstreamer server.
  • QuoteListener.cs and DetailsListener.cs implement the SubscriptionListener interface of Lightstreamer Client API, and receives the reale time updates for the Items subscribed.

Check out the sources for further explanations.

NOTE: Not all the functionalities of the Lightstreamer .NET Standard Client Library are exposed by the classes listed above. You can easily expand those functionalities using the .NET Standard Client API as a reference.
If in trouble, check out the Lightstreamer forum.

Build

To build your own version of the demo follow these steps:

  • Import the source codes of this project in a Cross-Platform Xamarin project. We have used Visual Studio 2022, that you can download from the Microsoft website.
  • You can choose the target devices between iOS and Android.
  • You should complete this project with the Lightstreamer .NET Standard Client library. Follow these steps:
    • In the "Solution Explorer" tab, right click on the project and choose Manage NuGet Packages ...
    • In the Search text box enter Lightstreamer
    • Choose Lightstreamer.DotNetStandard.Client then click Install and then Ok
  • You may run the demo against your local server or using our online server push.lightstreamer.com. The server to which the demo will connect to is configured in the RTfeed.cs file; by default the demo targets our demo server at http://push.lightstreamer.com.
    • In the former case, note that, as prerequisite, the Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • Launch the Debug choosing your preferred platform and enjoy.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer .NET Standard Client SDK version 6.0 and Lightstreamer Server 7.4.0.
  • Ensure that .Net Standard Client API is supported by Lightstreamer Server license configuration.
  • For instructions compatible with .NET Standard Client library version 5.x, please refer to this tag.
  • For instructions compatible with .NET Standard Client library version 4.x, please refer to this tag.

lightstreamer-example-stocklist-client-xamarin's People

Contributors

acarioni avatar bravo27 avatar giuseppecorti avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.