Free Custom TIniFile Class Source For Android And Windows

TIniFile for AndroidFrancois 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.

Free Custom TIniFile Class Source For Android And Windows by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

One Response to Free Custom TIniFile Class Source For Android And Windows

  1. Pingback: Store Settings With Native Platform APIs In Delphi XE8 Firemonkey On Android And IOS | Delphi XE5 XE6 XE7 XE8 Firemonkey, Delphi Android, Delphi IOS

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
IOS Send Email Delphi Firemonkey
Send Email On IOS Using Delphi XE5 Firemonkey

The D.P.F Delphi iOS Native Components by b_yaghobi on the Sourceforge repository provides components for composing/sending emails using Delphi XE-4...