Get the Most out of Android with 10.3 Rio

Today, I have a webinar on Getting the Most out of Android with 10.3 Rio. I want it to be a bit of a State of Android development today, as well as a What’s New in 10.3 Rio for Android. During CodeRage 2018 presented on what’s new in 10.3 Rio around Android. That session evolved into this webinar.

You can access the slides directly too.

Here is the Q&A log. I’ve gone back and typed answers to all the questions and included links too when possible. I may have edited some questions for length or clarity. The recording of the Q&A failed, and despite trying to recover it I wasn’t able to.

  • Question: what about Samsung Tizen os mobile? I think it’s different than Android OS
  • Answer:
    • When I worked for a large PC manufacturer, it was common for companies to tell Intel they were looking at AMD CPUs as a bargaining technique
    • Samsung mostly uses Tizen as a way to tell Google that they have options aren’t too attached to Android
    • Abandoning Android compatibility and ecosystem is dangerous
  • Question: and what about Android Intel processors or Android emulator with Intel Atom (x86)
  • Answer:
    • Intel’s Atom processors made a short appearance in Android devices 
    • They were x86 instead of ARM base 
    • Android 4.4 KitKat included libHoudini to provide ARM compatibility 
    • ARM compatibility was required because of widespread native NDK apps 
    • Most games include native NDK parts 
    • Discontinued for Android in 2016
  • Question: 8.1 Oreo not yet available for S8+
    • Answer: That is unfortunate, I thought it was. I recently read that Android 9.0 Pie is coming.
  • Question: In case I need an external Android library (jar file) included in my project, what should I do?
    • Answer: Check out the DocWiki for information. But you can add the JAR file in the Project Manager under Targets -> Android -> Libraries and then use Java2OP to create a JNI Bridge file. There is good information in the DocWiki
  • Question: Will there be the same webinar for iOS?
    • Answer: Maybe. I’m not as familiar with iOS, but I’ll see what I can do.
  • Question: Just a Note that Huawei also has a Dex equivalent and it seems to work better than Samsung’s. Please don’t ignore that
    • Answer: Very cool! It looks like it called EMUI Desktop on their HUAWEI Mate 10
  • Question: I am trying to use Drag and Drop to re-sequence TListView items and cannot find any relevant examples. (only things moving panels etc). how would I go about this?
    • Answer: I’ve not tried, but I’ve seen it done. I would treat the ListView items as individual items like panels and then drag those. On drop just look at where it as in the list and change the index.
  • Question: LivePreview are available somehow for Delphi CE?
  • Answer: Yes, just build it and install it. You can find the source here 
    • C:\Program Files (x86)\Embarcadero\Studio\20.0\source\Tools\FireUIAppPreview\
    • and more information on using it DocWiki
  • Question: Are there examples of how to make accepting permissions and explain why needed?
    • Answer: In the DocWiki and I covered it in the webinar.
  • Question: Receiving “Can’t open socket: Permission denied. Exiting” message when trying to debug an Android app. Running Android 8.0. This has been a problem since 10.2.
    • Answer: I just tested this with Rio and a Note 9 running Oreo 8.1 and it worked fine. There was a bug in Android 8.0 that impacted all debuggers. You can find more information on Marco’s blog post.
  • Question: Why does Delphi take so long, literally 5+ minutes, to recognize an Android device connected, via USB, to my laptop? Windows recognizes the device immediately and I’m able to browse the device within Windows file explorer. Clicking the refresh devices button has no effect. Is there a way to speed up this device recognition process?
    • Answer: Odd. I’ve not seen that. If you run ADB DEVICES from the command line does it recognize it? If not then that would be an issue with the Android Debug Bridge (ADB) so could be related to your device or the ADB USB driver. The single physical device has multiple devices that Windows recognizes. One is the MTP device for transferring files, the other is the ADB device for debugging. So just because windows recognizes the MTP device doesn’t mean it has recognized the ADB device yet. What device is it?
  • Question: Re: Delay recognizing device: Device is a Samsung Galaxy S8+. Also tried an HTC One M7 with the same result.
    • Answer: Did you try ADB DEVICES from the command line? It could be a Windows issue.
  • Question: Re: Open Socket error: Android version 8.0. Device Samsung Galaxy S8+. Running Delphi Rio 10.3 So there’s no workaround? Given the current route that Android updates arrive at devices: Google -> Manufacturer -> Telcom -> Device means that I’m stuck with no debugging for potentially years … already been ~6 months? Debugging is the reason I’ve invested in Delphi.
    • Answer: That was a bug in 8.0 Oreo that was fixed in Android 8.1 – it wasn’t specific to Delphi. Unfortunately, we don’t have any control over the Android OS or what Samsung installs on their devices. Wish we did. 
  • Question: What’s the best way to end an Android app?
    • Answer: Best practice on Android is that you don’t close your app, but let the OS manage that. If you need to though, then just call Close on your main form like you would on another platform. You could also try Application.Terminate and Halt.
  • Question: Just want to say that this has been an excellent seminar. Thank you for putting it on.
    • Answer: My pleasure. Glad it is of value.
  • Question: what are the sound capabilities in RAD Studio for Android?
    • Answer: You can do quite a bit. Anything that Android supports (which is a lot). There is a media player component that comes with FireMonkey. Take a look at the 4 sample games in GetIt. They have music and sound effects if I recall correctly. The great thing about using FireMonkey is you can get the productivity of all the FireMonkey components, libraries, etc. and then when you need to you can reach down and access the Android APIs just like developers who don’t use FireMonkey.
  • Question: Wouldn’t it nice to have a component for permissions?
    • Answer: The PermisionService makes it really easy, but a component could be useful too I suppose.
  • Question: Where are we with 64 bit for Android? 
    • Answer: R&D is working on it and it is on the Roadmap for later 2019.
  • Question: Give them the coming end of GCM, any plans for built-in FCM components?
    • Answer: Good question. I’ll need to look into that. I know there are some free 3rd party libraries that do that.
  • Question: Hello. where find more info about splash screen? It not clear how to control it.
  • Question: I can’t find LivePreview App on Google Play Store? Does it still exist?
    • Answer: Not currently, but the source ships with the IDE and you can build it and install it yourself. You can find the source here 
    • C:\Program Files (x86)\Embarcadero\Studio\20.0\source\Tools\FireUIAppPreview
    • and more information on using it in the DocWiki
  • Question: is possible to active and android Delphi generated app on both and remain on background sending GPS updates? any sample?
    • Answer: No samples, but I believe people have done it. You would need to be concerned about the battery though. You might need to go directly to the Android GPS API. I would suggest researching Android services on the Android developer site. There are a lot of rules about them.
  • Question: Hello, I’m wondering why for demos all presenters use a mac? Is better have Delphi on a Mac laptop?
    • Answer: I prefer Windows, and most developers I know do too, but Apple requires you to have a Mac if you want to build for iOS, and since I need to demo for iOS too then it makes sense to have just one computer.
  • Question: Ok. It will be great a webinar about to setup Delphi on Mac !!!
    • Answer: There is a good guide in the DocWiki 
  • Question: Is Firebase supported on Rio? from Rad Server?
  • Question: What about GUI test automation for mobile Delphi projects? Is there finally something available for that?
  • Question: 
    • Does the HTTP client library cover all SSL related topics or is there a need for “raw” TCP SSL sockets? If yes, the HTTP client might not be of help.
    • Although Android still supports SSL (Indy libraries), what about the support for the Google libraries (boring SSL).
      • Answer: Check out the new HTTP Client library that was introduced in XE8 – it uses the platform libraries, but don’t know if it supports Google’s Boring SSL specifically
  • Question: Does Fire Monkey support right to left languages like Arabic and Hebrew?
    • Answer: Take a look at FMX RTL. Also, if a 3rd party can do it, then you can do it yourself too. But using their library will certainly make it easier.
  • Question: Huawei is pronounced “hwah way” 🙂
    • Answer: Thanks! I tried to research it, but I am not good at pronunciations. 
  • Question: Are improvements in FMX listed. For example, when saving a TBitmap by SaveToFile, it did not pop up in the media on Android in my previous version. I had to add this programmatically.
    • Answer: I believe it has to do with where you save it and what file format. Save it as a JPEG or PNG and try saving it in a shared location like TPath.GetSharedPicturesPath.
  • Question: No question, just a hint: someone asked for Ranorex and Android. There is documentation on
    • Answer: Cool
  • Question: Google just announced a few days ago “Starting August 1, 2019: All new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play.” Looks like our apps will be orphaned later this year without a 64-bit compiler – what is the ETA for a 64-bit android compiler?
    • Answer: The  Roadmap has 10.4.x with 64-bit Android planned for “mid-2019”
  • Question: When will we see more common UI features as components (ie. not having to do things manually), such as slide menus, for example.
    • Answer: Like the TMultiView? It is a great common UI component that was introduced in XE7
  • Question: Can the location sensor be used in an Android service now?
    • Answer: I personally haven’t tested it . . . You may need to research the Android platform limitations on using location services in the background because of battery consumption issues. 
  • Question: how can we handle the android permission requests?
    • Answer: It is covered in the DocWiki and here is a sample in the location samples folder
  • Question: Did I understand correctly that there is a C++ Builder community edition accessible and free for any non-commercial use? (i.e., creating apps for personal use and for open-source distributed apps?)
  • Question: Doesn’t RAD Studio (or C++ Builder) have its own emulator to “test” apps on *all* platforms in a more-or-less automatic way? (assuming that the emulation is faithful enough)
    • Answer: We used to offer a bundle deal with MacInCloud but it didn’t get enough use to justify continue it since most people use devices. You can use the Android emulator but it isn’t great, and there are services that let you test on devices in the cloud. Samsung offers one too specifically for their devices. I’ve also heard some people have good luck with using Bluestacks, but I haven’t tried it. There are a lot of options.
  • Question: Speaking of how iOS is so different and has such different nuances compared to Android…
    • Answer: There is a lot you can do with a complete multi-platform approach, but then there are specifics to each platform you can take advantage of. For example, your desktop has a larger screen, and more input and output options. A pure multi-device approach does a lot and makes you really productive, but then the great thing about Delphi, C++Builder, & FireMonkey is you can also take advantage of platform-specific features and APIs. Kind of a best of both worlds approach!
  • Question: Thanks!
    • Answer: welcome!
  • Question: but there is a lot of devices that still running 8.0! Even Samsung …
    • Answer: Yes, it is an unfortunate bug in Android 8.0. Samsung says they have an update coming, and I hear the beta is already available. Have you tried that?
  • Question: What about 64-bit on Android, iOS, and macOS?
    • Answer: iOS 64-bit has been available for a while, bot macOS (10.3.x) and Android 64-bit (10.4.x) are on the roadmap for release this year. 
  • Question: what is the best way for FireMonkey mobile app to work with DB (on a server). REST or FireDAC? Or something else?
  • Answer: 
    • The best way depends on your goals and the scenario. 
    • I would recommend starting with RAD Server (EMS) using FireDAC to connect to the server database and then connect to RAD Server from your mobile app. 
    • You could also use DataSnap in the same situation (RAD Server is more of a turnkey, while DataSnap lets you build it from scratch so more flexible). 
    • If you don’t control the server then if the server is exposing the data over REST then you can use the REST Client libraries  or the BAAS libraries 
    • Although if it is on Azure or Amazon Cloud then use the cloud libraries 
    • You could also use DevArt’s UniDAC to connect directly to some databases from the mobile app
  • Question: Hello, what is the best way to show forms and destroy it for android application?
    • Answer: You can show and destroy forms just like you would on other platforms, or you might consider using frames on a Tab Control. Also, take a look at TFrameStand which is available in the GetIt package manager
  • Question: Is C++Builder Community Edition available for macOS?
    • Answer: Yes, it can target macOS. The same features as C++Builder Professional
  • Question: Is the size of the executable file for Android, prepared in FireMonkey still a problem?
    • Answer: It never was a problem. A “hello world” app in FireMonkey is larger than an equivalent app in Java because FireMonkey is including a lot of other additional libraries and features for building more complicated apps. There is a lot you can do to make a FireMonkey app smaller, but you give up functionality. If you look at real apps you will see that a Java based app and a FireMonky based app are much closer to the same size.
    • Take a look at this Anatomy diagram for more information. 
Anatomy Of A Delphi 10.3 Rio FireMonkey App from
Anatomy Of A Delphi 10.3 Rio FireMonkey App from
  • Question: When will there be support for 64 bit Android?
    • Answer:It is on the roadmap for 10.4.x this year (2019) 
  • Question: Jim: When will Update 1 be available for Rio?
    • Answer: When it is ready. I expect it will be soon, but I can’t say specifically when.
  • Question: What are the critical target versions that should be tested?
    • Answer: All of them? 😉
    • You should be testing on Oreo 8.1 (the target SDK version) and probably Marshmallow (the minimum SDK version) too.
    • You should test on as many devices and OS versions as you can.
    • Pay attention to the Version Distributions Dashboard on the Android site to see what versions are most popular  
    • You can also follow other sites like to see what versions and devices that are popular
    • It can also depend on your app and your user base. Maybe you are targeting a specific region or tablets.
    • Then select the targets that give you the largest coverage.
  • Question: Best Book for quick start to sophisticated Android apps?
  • Question: Timeline for support of WatchOS from Apple?
    • Answer: Both WatchOS and AppleTV require apps published to the app store are in an intermediate format that Apple hasn’t published. 
    • I believe you can still build apps to deploy directly the platform though. 
    • Those platforms are not on the roadmap.
  • Question: I received this from Google: Ensure that your app supports 64-bit devices. Does Rio support this?
    • Answer: 64-bit is on the roadmap for mid 2019 
  • Question: For a Delphi Windows application to access files on your Android phone connected via USB. See
    • Answer:Useful. That is using the PortableDeviceApiLib Type Library, good idea. You could also do it via ADB if you enable debug mode on the device.
  • Question: Why don’t forms have an option to auto create?
  • Question: How to send SMS from an Android app?
    • Answer:Yes there is sample code online although I haven’t tested it and it may need to be updated.
  • Question: Is there a easy way to get some values from a record from a local website
  • Question: Please address how to read and write external files from/to the SD Card.
    • Answer: That isn’t something I was planning to cover, but I will test it and post to later.
  • Question: Is adding other android SDKs to 10.3 fixed – had a hard time with 10.2?
    • Answer: I’ll blog about it some more. It is pretty straight forward, but there are some details in the DocWiki 
  • Question: I miss the DBaware components from VCL in FMX. How can I get Design time data?

Here are some interesting statistics I originally didn’t include because of time . . .

Android � Logos Download
Android statistics and facts
  • 85% of the global mobile operating system market runs Android
    • 62% of US,  76.4% of China, & 25% Enterprise markets
  • 37.93% of all devices connected to the Internet
  • 70% of tablet market
  • 400+ manufacturers with 4000+ devices on 500 carriers
    • 600+ devices launched in 2015 alone
  • The average Android smartphone user
    • Touches smartphone 2,617 times a day
    • Has 95 apps installed, but only uses 35 apps daily  
    • Deletes unused apps after 12 weeks
  • 34% of US smartphones are by Samsung (running Android)

Android Statistics Sources: 

I pulled a couple of graphics from my presentation that I thought were interesting and that you are free to share. (Select an image for the larger version.)

This entry was posted in 10.3 Rio, Android, News, webinar. Bookmark the permalink.

4 Responses to Get the Most out of Android with 10.3 Rio

  1. omar says:

    i`m omar
    i have some questions
    can i have your email

  2. Hi. I watched the webinar yesterday. I have been waiting for links to replay and Q/A all day. Where can I find it?
    Also I saw in the q/a someone asking about the bug in Oreo 8.0 stopping from debugging. I have had that for a long time in my Samsung A5 2017 and now also in my Cat phone that just got 8.0 Oreo. Neither of them has got 8.1 update. Basically I don’t care what. I can just not run Delphi to develop apps on them. It is a showstopper. I need a fix for it and really think Embarcadero should tell how.

  3. Jim McKeeth says:

    The Q&A recording failed. I spent quite a bit of time trying to recover it. Instead of just went and re-edited the text Q&A log and provided detailed answers. It is available now. I also went back and added some more details at the end of the webinar based on questions and to cover some things I didn’t get covered in the webinar.

    With regard to debugging on Oreo 8.0: It is a bug in the Android OS version 8.0 and was fixed in 8.1. It isn’t specific to Delphi. Unfortunately we can’t control the Android platform or what version the manufacturers install. I wish we could (seriously that would be great). As far as I know there is no work around besides getting the version of Android that fixes it. Sorry, I wish there was.

  4. otani says:

    Could you please provide the following simple projects about RaspberryPi androidthings?
    1. GPIO control, ie LED Blink and Switch input.
    2. SPI serial communication.
    3. I2c serial communication.
    4. UART serial communication.
    5. PWM control.

    I spent several weeks on the above basic project, but it did not succeed.

    I posted to idera community , however no responce.
    Thank you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.