Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

LiveBindings REST Client Demo With Two Hidden Gems For Delphi XE6 Firemonkey On Android And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE6 Firemonkey LiveBindings REST Client Tutorial | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDeveloper Superlevin has a blog post up where he explains how to consume a REST service with LiveBindings in Delphi XE6 Firemonkey. He also points out a hidden gem buried in the Delphi samples directory. The blog post is in Chinese so you’ll probably need to use a translator (like Google Chrome) on it but in provides a pretty detailed tutorial on consuming the REST service. The service he uses is from the city government of TaiPai and it returns JSON data containing a list of hotels. He shows you what components you need to add and how to changed the settings so they connect to the REST service and then output the results for consumption by LiveBindings. The results come into a RESTResponseDataSetAdapter component and then are output to a TListview. Using the REST Debugger is also demonstrated. Now here is where the hidden gem comes in. Deep within the Embarcadero \ Studio \ 14.0 \ Samples \ Object Pascal \ Mobile Samples \ User Interface \ ListView directory there are two packages that you can compile and install into the IDE. They are a Listview Multi Detail Appearance package and a Listview Ratings Appearance package. Once you install these into the IDE you will be able to have a TListViewItem that contains three lines of data instead of just one and a TListViewItem with a ratings element. This sample should work on all Firemonkey platforms which are Android, IOS, Windows, and OSX in addition to compiling in AppMethod.

Head over and check out the full tutorial on building a LiveBindings REST client and then download the source code.

Or head directly to the sample source code for the Delphi XE6 REST client demo on Github.

Exit mobile version