Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidC++BuilderDelphiFiremonkey

Learn How To Deploy Delphi 10.3 Rio Android Apps To Google Play With Android 64-bit Requirements

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSThere are a number of ways to deploy Delphi and C++Builder FireMonkey apps to Android devices which includes sideloading the apps (copying them to the device), through an enterprise MDM like AirWatch or MaaS260 (mobile device manager), and through Google Play. In addition to Android, FireMonkey apps run on Windows, MacOS, IOS, Linux, and HTML5. Google Play has a restriction that will be in effect on August 1st 2019 which will restrict adding new app (or updating existing apps) which target Android 28+ and contain native libraries as the main app unless they include Android 64-bit binaries in addition to Android 32-bit binaries. You can read a blog post from Google about these changes where they outline exactly what the requirements are and what the exceptions are. RAD Studio 10.3.x Rio (and previous versions) which consists of Delphi 10.3.x Rio and C++Builder 10.3.x Rio currently creates 32-bit binaries for Android.

According to the blog post three third party native files have an exception which allows them to continue to support 32-bit apps which target Android 28+ to Google Play. These three third party developer tools are:

  • Corona Labs SDK – until August 2020
  • Adobe Air software and the AIR SDK – until August 2020
  • Unity 5.6.7 or older – until August 2021

For Delphi 10.3.x and C++Builder 10.3.x and earlier apps the important line in the blog post is this The requirement does not apply to: APKs or app bundles that are not distributed to devices running Android 9 Pie or later.” What this means is that for Delphi 10.3.x and C++Builder 10.3.x apps (and all previous FireMonkey versions) you will need to add android:maxSdkVersion=”27″ to your AndroidManifest.template.xml file in the uses-sdk section. For example:

<uses-sdk android:minSdkVersion="%minSdkVersion%" 
android:targetSdkVersion="%targetSdkVersion%" 
android:maxSdkVersion="27" />

What this line does is restrict your app from running on Android 9 Pie (Android 28+) devices which at the time of this writing is only ~10% of Android devices. I tested this solution and Google Play does not display a warning when you upload your Android 32bit app with the maxSdkVersion set. You can still continue to add new FireMonkey apps and update existing apps through Google Play with the maxSdkVersion set. Additionally, you can continue to sideload and deploy your current FireMonkey apps via MDM solutions to Android devices. According to the blog post “Google Play will continue to deliver apps to 32-bit devices. This requirement means that apps with 32-bit native code will need to have an additional 64-bit version as well.” [to be able to target devices running Android 28+]

Developers and third party developer tools like RAD Studio Delphi and C++Builder, Unity, and Adobe AIR are at the mercy of requirements handed down by Apple and Google in order be listed on the major app stores. These requirements constantly change and require updates which is why building apps for Android and Google is a commitment to updating your app frequently and staying up to date with the latest developer tools. Within the Delphi ecosystem this means being on the Update Subscription. Companies that make developer tools for Android and IOS are also committing for a price to keeping their tooling up to date in partnership with their customers.

A more experimental view of Android 64-bit app requirement is that all that Google Play seems to currently check for is that a library (or just a file) exists at lib/arm64-v8a/libMyapp.so in addition to the 32-bit version of your app located at lib/armeabi-v7a/libMyapp.so. I uploaded an Android APK to Google Play with a 32-bit FireMonkey library generated with Delphi 10.3.x Rio in both the armeabi-v7a and arm64-v8a directories and Google Play displayed no warning about missing Android 64-bit support. According to this StackOverflow answer “64-bit Android can use 32-bit native libraries as a fallback, only if System.loadlLibrary() can’t find anything better in the default search path.”. What this means is that it may be possible create a 64-bit Android binary shim in the arm64-v8a directory using a different tool (the Android NDK?) that loads your FireMonkey 32-bit binary from the armeabi-v7a directory if you need to target Android 9 Pie (Android 28+) devices with RAD Studio 10.3.x apps through Google Play.

Embarcadero has a blog post titled “May 2019 RAD Studio Roadmap Commentary from Product Management” where they outline their plan for Android 64-bit support for Android 9 Pie (Android 28+) devices. It states:

“As of August 2019, Google will require that all Google Play Store applications are 64-bit enabled. Android 64-bit support is actively in the works for Delphi as we speak. In time for this new Google requirement, we plan to kick off our 10.4 beta this summer with support for building Delphi Android 64-bit applications. While the usual beta restrictions do not allow for building and deploying production apps, we intend to include a special beta EULA provision that allows 10.4 beta testers to deploy (production) Android apps to the Google Play Store. We followed the same approach for 10.3 and Google’s API level 26 requirement last summer and that process worked well for our customers. InterBase support for Android 64-bit is also in the works.”

Bottom line is that Delphi 10.3.x Rio and C++Builder 10.3.x Rio 32-bit apps can continue to be deployed via Google Play using android:maxSdkVersion=”27″ to 90% of Android devices and Embarcadero has Android 64-bit support for Android 9 Pie (Android 28+) devices on their roadmap.

Update: Embarcadero has a blog post about how you can also ask for an exception to the Android 64-bit requirement on Google Play.

Update: Delphi 10.3.3 is available and supports Android64.

Head over and check out the full blog post about the Embarcader RAD Studio Roadmap and future Android 64-bit support.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

1 Comment

Leave a Reply