I was a guest on X-Keys 5 Minute Friday showing off an integration between OBS Studio with the X-Keys XK-24 USB Keypad. I created a script that assigns F13 through F24 with and without the CTRL modifiers to the XK-24. You can simply assign these in the OBS hotkey settings and it will respond to those globally.
Here is the MW3(VB) script you can load into MacroWorks obs-xk-24.mw3
For some reason the F24 and CTRL+F24 didn’t work. I’m not sure if that is an OBS issue or where the cause originates. This would allow you to use your XK-24 with any software that that allows you to assign F13-F24 and recognizes global hotkeys.
10.3 Rio’s installer (I use and recommend the EXE/web over the ISO, since it is faster and more flexible) does a fantastic job of installing and setting everything up for Android development, without requiring any manual steps. Still, sometimes it is nice to be able to manually install everything, which brings me to this guide.
I’m a big believer in understanding the way the underlying systems work, and installing this way is more work, but you are able to see how everything works together. Also, this allows you to share SDKs between multiple installations, and also place the tools like ADB on your path for easy use. Not to say you can’t do all of that with the automatic install, but sometimes it is nice to get your hands dirty.
I also occasionally run into people who are having trouble getting things installed for various reasons. So this is a great way to troubleshoot installation issues.
This assumes you already have RAD Studio, Delphi, or C++Builder 10.3 Rio already installed. 10.3 Rio changed the versions of the SDK and NDK that it uses, so this guide won’t work with other versions. Also, I switched to AdoptOpenJDK instead of the traditional Oracle JDK. I’ll show you how to install that here, but if you use a different JDK that will be different for you.
OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License version 2 with a linking exception. It is the official reference implementation of Java SE since version 7.
There are multiple builds available, with different terms and support options. Why not just use the Java SE JDK? Oracle has changed the license on it that may require you to purchase a license to use it. For my purposes it is better save than sorry, plus the OpenJDK is a lot smaller and less annoying. I picked AdoptOpenJDK, which seems to be the most popular option, but this should mostly work the same with any build.
AdoptOpenJDK includes the JRE (Java Runtime Environment) too, so just one install. You must install it first because you can’t run the Android SDK manager without Java installed, and the IDE users the JDK for KeyTool and JarSigner.
AdoptOpenJDK Install Instructions
Download the Windows installer for OpenJDK 8 (LTS). I used the 64-bit Windows version with the HotSpot JVM, and then just run the installation. Be sure to tell it to set the JAVA_HOME environment variable.
When you visit the site to download the Android SDK they try to get you to download the full Android Studio, but you don’t need all of that. If you scroll to the bottom, you will see the “Command line tools only” downloads. One note, the downloads listed on the site no longer include the GUI SDK Manager. If you scroll down further, I’ll show you how you can download that and use it instead.
This isn’t an installer, so just pick a folder to unzip it into. You will just find a “tools” folder in the zip. This contains the SDK Manager to install the rest of the Android SDK. I typically unzip it into the folder:
Then use the sdkmanager command-line tool (in the tools\bin folder) to install everything you need. Notice I am installing the Android 26 Platform. This is the version you want to use with 10.3 Rio. It meets the new Target SDK requirements and still gives your Android apps maximum compatibility. This is the version 10.3 Rio is designed to work with.
The fact we are installing an older version of the SDK isn’t a big deal because we will still update it when we are done, but now we have a choice of using the command-line interface like I showed in the previous section, or using the GUI SDK Manager by running the Android.bat file in the tools folder.
Once you run the SDK manager, you want to install the latest Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools, Android API 26 SDK Platform, and the Google USB Driver. It will default to installing a lot of other things you don’t need. Feel free to deselect those. The Google USB Driver isn’t technically needed, but is nice to have.
Once you’ve selected what you want installed, you can always update them via the command line with the sdkmanager utility in the tools\bin folder
Installing the Android NDK
10.3 Rio updated the version of the Android NDK it uses to release 17b. It was the latest at the time of Rio’s development. There have been some new NDK releases since then. If you visit the Older Releases page for the Android NDK you will see 17b isn’t listed there, but the download file is still available. 17c may work, but I haven’t tested it extensively yet.
There are no further installation steps necessary. Your folders should look something like this when you are done:
I’ve expanded the directories so you can see the build tools and Android platforms also installed
Environment Variables and System Path
Last thing you need to do is set up some Environment Variables and add things to your system path. This isn’t strictly necessary, but I highly recommend it!
Then add the following to your system path
%JAVA_HOME%\bin (you can replace the expanded version with this)
Settings Up the IDE SDK Manager
Since we’ve installed the SDK manually, we need to tell the IDE where to find it. This is really simple. Go into Tools ? Options ? Deployment ? SDK Manager (or just use the IDE search for SDK Manager) and add a new SDK entry.
The next stage in the wizard looks to make sure it can find everything it needs. If you didn’t install everything with the Android SDK Manager, then you may see a warning symbol next to something. If that is the case go back and double check the installation.
And with that you are ready to develop and deploy Android apps with FireMonkey.