Book Image

Delphi Cookbook

By : Daniele Teti
Book Image

Delphi Cookbook

By: Daniele Teti

Overview of this book

Table of Contents (14 chapters)
Delphi Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


There are situations where if you need a particular Android or iOS feature, FireMonkey doesn't help you. FireMonkey does a very good job in supporting all the common mobile features, but it is still relatively young. This means that not all the APIs have been already imported, polished, and wrapped in nice Object Pascal reusable classes or components. So, what can you do in such cases? The good news is that you can import classes from the underlying SDK (and NDK, in case of Android) and wrap them just like Embarcadero does on the FireMonkey platform.

In this chapter, we'll see some classes import examples. Keep in mind that the code using imported classes is not cross platform. That is, if you import an Android SDK class and your code uses it, you lose the possibility to compile that specific code for iOS. However, you can, as usual, use some IFDEFs to statically select the Android-specific code from the iOS-specific code.