Delphi language bridges
So far, we have seen how to access cross-platform implementations of services such as sensors, address book, maps, and others. All of them come out of the box. Luckily, Delphi comes with the source code, so it is possible to inspect how Delphi itself is accessing the underlying mobile APIs on Android and iOS. All supported operating systems are different and there are different ways of accessing their raw APIs.
Let's consider a simple example of making your mobile device vibrate in code. That is not something that Delphi provides, but we can use this case to analyze the process of accessing any functionality that is not readily accessible in Android and iOS.
Vibrating on Android
Android is based on Linux and Java. Accessing Android APIs requires being able to call from Object Pascal into Java code. This is the role of the Object Pascal to Java language bridge and this is how FireMonkey gets access to Android functionality. Before we can access certain functionality in...