Since Delphi XE2 it is also possible to create mobile applications (iOS), since XE4 also for Android. It quickly became clear that app development with Firemonkey is not only a bit different, but it also depends on a lot of research. So the obvious way to do that was to create a UNIT and put everything into this unit that was needed for mobile app development.
Since all forms are always displayed in full screen on the mobile devices, first of all a window manager had to be created. Also, you quickly realize under Firemonkey that the styles only work properly, and this is especially true for click events when you leave the UI task (main thread) all the time that is available. This also means that you should by no means insert something into a button click event that costs time at all. So once you've determined that the user pressed the button, the flowcontrol must be returned to the main thread as soon as possible. But when can I call my action which the button should trigger? The answer is either I'm doing it in a thread or I'm waiting for the application to trigger the onIdle event. This is actually the magic of FMX app development. Of course I have programmed a corresponding handler for this to handle this type of OnClick events.
Countless units of the FDK are dealing with threading, generating elements at runtime, interface wrappers so you can test everything under Windows, because there is no ARC, and much more.
Another issue is certainly a simple use of the SQLite database preinstalled on the mobile platforms. The most common question asked is: How do I get my data from the mobile device to a server?
Normally you should use a REST service via JSON, so it was obvious to program corresponding methods. Numerous of there functionalities are now also available in nativ Delphi, but my wrapper are still easier to use. The best example is certainly the interface to query the "new" permissions on the Android platform.
Newcomer to Firemonkey will certainly encounter problems in the beginning, eg the on-screen keyboard overlays the edit component. Again, there is a autoscroller component in the FDK.
All necessary settings, database connections and autoscrollers as well as the application events can be done with one line. At the moment I'm still working on a MVVM plugin for the FDK as well as on a Delphi-capable MVVM stand-alone implementation.
Update 2.0 for the FDK is comming, too!
Besuchen Sie und auf den diversen Plattformen.