Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetComponentDelphiDemoFiremonkeyWindows

Free Custom TIniFile Class Source For Android And Windows

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

TIniFile for Android | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSFrancois Piette on his blog “Behind the connection” writes about how to create your own custom TIniFile class for your Delphi Android and Windows Firemoneky applications. He describes how to model a custom class using the SharedPreferences API to make INiFiles work on both the Android and windows platforms. Typically with Windows applications, the INI file format is a simple text file with a Key/Value pairs and all the related pairs related grouped into a a section.  With an Android application, there is no concept of a section. Therefore, to create the section concept, Francois simply prefixes each key by its section name surrounded by brackets like this: ‘[‘ + Section + ‘]_’ + Key.  In addition, Delphi has a class encapsulation of the Windows INI files (TIniFile) which resides in the “System.IniFiles unit”. Francois uses the same class name in his implementation and even the same class signature by inheriting from the existing TCustomIniFile for Android and TInifFile for Windows. However, instead of using “System.IniFiles”, he uses “FMX.Overbyte.IniFiles” in the uses clause. Stop on over and read Francois’s article and find out how he handles file storage location and see his example code. While you are there, you can download the full source code of his custom class and demo.

Get the full source code and demo here

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply