Get the fat out from XE5 Android apps - FireMonkey Runtime for Android [Edit]

In the modern mobile OSes (like iOS and Android) the applications are run into a sandbox for more control, security and performance reasons and there are no (easy) ways to separate/use a "runtime" library (in Delphi's case RTL + FireMonkey) to be shared by multiple apps. This problem is common to all mobile x-plat runtimes/wrappers like Adobe AIR ( or Mono ( 

In Delphi's case the problem with the increasingly fat apps (statically linking RTL + FireMonkey to the application binary) comes from the non-optimized linker (GCC/LLVM LD ?) that should "collect" into the generated lib/app just the actual code used not all the unused-dummies. 
The good old Delphi linker used to be quite smart, being quite well known for generating small executables (VB-runtime killer !) ... but for some time, with the new added RTTI and Generics support the bloat was coming into Delphi's town as well.
In this context more than one year ago I created a QC proposal "Extended $RTTI for metadata inclusions & exclusions for classes and units" ( but Embarcadero doesn't seems to be interested into it ... so please vote for it if you find it useful.
Now, with the new LLVM backed Delphi next-gen compilers and LD linker there is a different story, and I hope the compiler guys (Allen Bauer & co) are already looking to the bits in this area (LLVM & ld) for "smarter" linking to trim-out the unsed fat from generated executables.

So, while optimizations in the LLVM backed nextgen linker will benefit all the FireMonkey supported platforms (Win, Mac, iOS, Android) ending up to smaller static FireMonkey apps.... I consider that an Android specific solution will dramatically decrease the application size and benefit the overall runtime FireMonkey reuse.
My *PROPOSAL/IDEA* to Embarcadero is to add support for generating an application using a shared mobile FireMonkey runtime APK similar to Adobe's AIR runtime. The Adobe AIR runtime could be found here on Google Play: and the AIR applications using it will automatically detect its presence and if not available asking for it to be downloaded. I envision that Embaracadero could do the same,  by creating a FireMonkey runtime to be made available on G
oogle Play (suggestion: that will include all the FAT from the RTL and FireMonkey Android API ... so a Delphi FireMonkey app relaying an the FireMonkey Runtime will include just the REAL code & resources ... Anyhow, while the implementation might not be a small feature ... this should be quite "natural" to Delphi that already supports dynamic runtime packages.
I created a QC Feature Request so please vote if considered useful: "Create a shareable FireMonkey Runtime for Android" 

*NOTE*: This "feature" could not be definitely used on iOS due to drastically constrained sandbox/Apple policy where you can't access non-Apple shared libs. In this case Adobe AIR use a "Captive" runtime for iOS where the AIR runtime is statically linked to the application (similar to in Delphi's FireMonkey approach)

As a reference, here are some useful links in the context of Adobe AIR Runtime for Android and iOS:

How are Adobe AIR applications packaged and deployed?

Package Adobe AIR applications for Apple iOS devices
Adobe AIR Runtime for Android ...

Adobe AIR Captive Runtime FAQ

Installation and deployment options in Adobe AIR 3

*MORE-GENERAL PROPOSAL*: Providing dynamic package support for Delphi for Android compiler/linker could greatly benefit the Delphi components providers (including Embarcadero with the above proposed FireMonkey Runtime for Android) that could create specialized Android "component packages" (similar to VCL bpls) that could  be shared into the Google Play. I see quite a *HUGE BENEFIT* for Delphi Android developers and vendors with having such support in our Delphi tool-chain for Android !
9/20/2013 7:29:04 AM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 9
Get it on Google Play
Get it on Apple App Store

Unfortunately,  development seems to be going quite the opposite way. The new RTTI appends a lot of information about the classes onto the executable and I have the impression that it also seems to prevent unused methods from being removed. I find the whole concept awkward to tell you the truth. For a single executable it may not matter much, but when your whole development process is based on fine granularity (complex industrial applications using and sharing lots and lots of dll's which are maintained b
y separate developers) then having such overhead inside each and every single module quickly becomes unacceptable. In a sandboxed system like IOS, it makes sense to use as much of the operating system's functionality as possible without re-inventing everything.
9/20/2013 7:18:21 AM

Similar Artilces:

Does Delphi XE5 on Android work with the Android emulator? [Edit]
I find that even a hello-world app exactly like the one that David I outlines (add a button, one line of code, set button text) will not run on the Android Emulator configured out of the box. First, after installing the Rad Studio XE5 trial, I followed David I's steps exactly, and the emulator would not even start. Then I clicked Android SDK manager, updated it, and clicked run-without-debugging. It asked me if I wanted to start the emulator this time so I did. Now the Firemonkey app will not start up the emulator, and while it does appear to start debugging, the emulator scree...

Does an android app created with Delphi XE5, XE6 run on Android 5 without modifications?
Is a FireMonkey NDK application forward compatible as much as a JDK one? Markus wrote: > Android changed the JVM from Dalvik to another one (just forgot the > name) The new runtime is called ART. > and that caused issues with Delphi based programs which had any > images in them as TImage.LoadFromStream didn't work properly > anymore and a few small other issues. But that was not a problem with the NDK itself. Just that there was a new runtime underneath the NDK, and FMX was making some assumptions that work under Dalvik but not under ART. -- Remy ...

Delphi XE5 Android App dies preparing INDY email [Edit]
Can someone help me with the following code, it connects and authenticates the idsmtp connection but the app dies on the line:- idMessage1.Recipients.EMailAddresses:=''; Anyone had and overcome this problem? procedure TForm3.Button1Click(Sender: TObject); begin if idSMtp1.Connected = true then idsmtp1.Disconnect; idsmtp1.Connect; //THIS LINE WORKS idSmtp1.Authenticate; //THIS LINE WORKS idMessage1.Clear; //THIS LINE WORKS ...

[SOLVED] Delphi XE5
Hello, I have a very simple program that works perfectly. But if I add a TIdTcpClient component on my form, with no change in the properties or event, just add it, then application crash when exiting with the hardware return button. What is wrong ? thank you Franck {code} unit FormTestModbusXE; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.TabControl, FMX.StdCtrls, FMX.Edit, FMX.Layouts, FMX.ListBox, IdBaseComponent, IdComponent, IdTCPConnection, Id...

[XE5 Android] How to read the phone number on the Android Device ? [Edit]
In Delphi XE5 Android, How to read the phone number on the Android Device ? I do not find Android API Unit..such as Androidapi.JNI.os, Androidapi.JNI.Telephony.................and so on...... ...

How can i get android sms PDUS data in Delphi Android BroadcastReceiver
I'm trying to get delphi android sms input with sms broadcastreceiver. But 'type cast' returns nil object. First i'm getting bundle in intent like eclipse android, but i cannot continue coding for reading sms input because *JObject to TJavaArray<JObject>* casting returns to me nil object. My codes here {code} using Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony, Androidapi.JNIBridge; procedure TMainScreen.BroadcastReceiver2Receive(Context: JContext; Intent: JIntent); var obj: JObject; I: Integer; msg : JSmsMessage; pdus : TJavaArray<JOb...

Help Delphi xe5 develop Android App
Hello i have problem for develop android app and use emulator the xe5 failure [INSTALL_FAILED_DEXOPT]. how to fix the problem ...

movetasktoback function delphi xe5 android? [Edit]
Hi, I want my application not close when the back button is pressed. I want it to minimize and run in background. Is this possible? I've saw a movetasktoBack function on Java. Is this function available for Delphi too? {code} public class TestActivity extends Activity { //... // Working for all API levels @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { moveTaskToBack(true); } return super.onKeyDown(keyCode, event); } // Alternative variant for API 5 and higher @Override ...

How to fully close a Delphi-XE5 Android App?
This has been asked before but not fully answered. I want to exit an app for two reasons. 1. on startup if problems with the data files and (I'd also like to know to handle this case on IOS too!) 2. from a back-button press Other answere here and elsewhere got answers of using: SharedActivity.Finish; or MainActivity.Finish; Both appear to close the window but neither exit the application as in debug mode the program does not end in Delphi and the application is still running on the device itself. The apps seem to eventually go away when in that state, but if you tr...

Delphi XE5 TWebBrowser Problem on Android [Edit]
I have write 4 samples code: 1) paginaweb:='file://'+pathpdf+'prova.pdf'; webbrowser1.URL:=paginaweb; 2) paginaweb:=''; webbrowser1.URL:=paginaweb; 3) have used webbrowser1.Navigate(paginaweb); 4) paginaweb := ''; webbrowser1.Navigate(paginaweb); or webbrowser1.URL:=paginaweb; webbroser1 is in a mobile form. All not work on Android but work fine on iOS, the case of youtube url load page but still stuck on loading vide...

android service application on Delphi XE5 [Edit]
Is it possible to develop "android service application(backround)" on delphi xe5 ? if possible, how to ? Thanks. Edited by: caner aytac on Sep 20, 2013 3:40 AM Edited by: caner aytac on Sep 20, 2013 3:45 AM ...

Delphi XE5 Android problem (Indy TCP) [Edit]
Hi! Have some major problems, no ideas left. My Android app. is using a component TCP Server-Client Library ( that I made before. The server app. is built with Delphi XE2 and is using this same component too. The problem is that when I try to download some files with it to Android the Android app. either freezes, or the download stops, randomly (sometimes 3 files arrive successfully and then freezes/stops). Testing with 3 10MB and 2 100MB audio files which are transfered at the same time. What ...

send sms android app delphi xe7 question [Edit]
i have written following code for send sms on delphi xe7 but i have following error { java.lang.securityexception: sending sms message : uid10176 does not have android.permission.send_sms } { unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net, Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony, Androidapi.Helpers; type TForm1 = c...

Delphi XE5 serious abnormal Debug / Operation Android App
After about 2 weeks of work on a project of an App Android / iOS already published on the App Store and Google Play I found the following errors: 1 - If I compile the project target device debugging the app works perfectly if it is in the foreground all goes well for hours while if I leave in the background debugging ends after a few hours and the compiler returns to stop mode but the app is still running on device. 2 - If I compile the project target device debugging the app works perfectly close the compiler I disconnect the device and I'm going to do anything else with the device...

Delphi XE5 update 2 stops all Android Apps Compiling
Hello Downloaded and installed XE5 Update 2 after un-installing RAD Studio XE5 now none of my Android apps will compile, all of which were compiling before. Get Linkage error message such as:- [DCC Fatal Error] F2588 Linker error code: 1 ($00000001) Tried doing build and deleting .o .dcu and .apk files Checked Android SDK installed and the NDK This is a bad situation and any help most appreciated. Clive Morgan wrote: > [DCC Fatal Error] F2588 Linker error code: 1 ($00000001) If you create a new application for Android, do you have the same issue? -- Dave Nottage ...

Web resources about - Get the fat out from XE5 Android apps - FireMonkey Runtime for Android [Edit] - embarcadero.delphi.non-tech

Firemonkeys - GamesIndustry International
The world's leading games industry website. Get insight from todays industry leaders with news, interviews and analysis of global gaming trends. ...

Firemonkey’s Real Racing 3 To Launch At The End Of February
In September, Apple demoed Firemonkey’s Real Racing 3 at the iPhone 5 event . Three months later and the game has yet to show up in the App Store. ...

EA Games and Firemonkey Bringing Real Racing 3 to Android, Fasten your Seat Belts
Start up your engines race fans, EA Games is teaming up with Firemonkey to bring Real Racing 3 to mobile devices. If you’re a fan of more realistic ...

EA's Firemint and IronMonkey Studios Merge to Become FireMonkeys
... game development studios into one mega-studio in Australia. Firemint and IronMonkeys will be merged into a single studio now known as Firemonkeys ...

News: Firemonkeys announces Real Racing 3
Firemonkeys, a new gaming subsidiary of Electronic Arts born from the merger of FireMint and IronMonkey, has announced the coming release of ...

firemonkeys - iMore
EA has pushed out another impressive update to its equally impressive iOS racer, Real Racing 3, that for the first time brings cars from Ferrari ...

Firemonkeys on Real Racing 3 going free-to-play
... got a hands-on preview of Real Racing 3. We also spoke with Ptolemy Oberin, one of the game’s programmers and project lead at developer Firemonkeys, ...

Real Racing 3 coming in 2012 from Firemonkeys
The first game from recently merged developer Firemonkeys is Real Racing 3 , the developer revealed moments ago during EA's Summer Showcase event ...

Firemonkeys Previews Real Racing 3 for iPhone and iPad
Firemonkeys, the new combined studio from EA combining the IronMonkey and Firemint gaming studios, has announced the development of Real Racing ...

EA Mobile Moves: IronMonkey & Firemint Merge Into “Firemonkeys,” Now Have 50M Players Between
... that it is merging two top mobile game studios, IronMonkey and Firemint , which will fittingly combine to create a new company, called Firemonkeys. ...

Resources last updated: 2/5/2016 4:08:27 PM