During the Android Walkthrough session at XDC Travis Hill and Paul Lefebvre showed us the current status of making Android apps via Xojo. As Geoff said in his keynote there is considerable amount of work left to be done.
Last XDC had some compiled code running in the emulator and one control. That was it.
Today they have compiled code running in emulator and devices for both 32-bit and 64-bit. APK creation. Emulator installation and execution. Control positioning and locking. Now has 25 controls which is a bulk of the controls for version 1.
Buttons: Regular, Segments, and Toolbar
Pickers: DateChooser, Slider, Switch
Inputs: TextField and TextArea
Decorations: Label, canvas, oval, rectangle, and separator
Indicators: ProgressBar, ProgressWheel
Viewers: HTMLViewer, ImageViewer, ScrollableArea, Table, VideoViewer
NonVisual: ImageChooser, Location, MessageBox, Timer
Android is unique. Code that executes via Java Virtual Machine and Native. They communicate via the Java Native Interface. The Xojo framework is built with Xojo and Kotlin. Kotlin is recommend by Google. But essentially we don’t have to worry about.
Application execution works with both 32-bit and 64-bit. 32-bit OS is still popular on devices. Support ARM (devices) and x86 (emulator). Xojo figures it out for you automatically.
Typical data types: Integer, Double, String, Variants.
Layout editor is what we’re familiar with. An Android ‘view’ is really just a Window.
Uses API 2.0. Which means Standardized naming. Errors are exceptions. Zero based offsets.
Requirements: Mac/Windows 64-bit for the first version. Linux has some unique issues. Android Studio required to provide the emulator and debugging tools. Android 9.0 (Pie) SDK. Target Android 4.4 and better. Will run on a vast majority of devices in the world. SDK version can change.
What’s Left? Largest piece left is Framework completion. The other big piece is the Debugger – there are some technical challenges in debugging with the native and JVN code.
So, no answer to when it will be available.
The Future: After initial release Auto Layout (used control locking to begin with). Will eventually support plugins (those built in Xojo) and those can call OS API’s (JVM) and/or include native libraries. Most of the focus on phones and should work on tablets.
Travis showed us a demo of Android:
Layout Editor looks very much like iOS – except it looks like Android. Drag and Drop and resizing the Layout Editor looks pretty smooth but nothing that iOS doesn’t already do.
Hitting Run for a simple app didn’t take too long and it opened it in the emulator.
Travis mentioned that even with debugging you have to do Code Signing.
In 2nd example he showed an Android table with some initial values. Table scrolled properly. He flipped the phone in the emulator and showed that the control didn’t adjust. Went back and used the Lock control properties in the inspector and then took it back into emulator to see it in action.
Q & A:
No container container in list. Yes, there will be.
Can you write an iOS and Android from same project? No. Not today.
Currently it builds 32-bit and 64-bit builds automatically.
Why do plugins need to be in new format? The plugin format allows you to call the JVM and native libraries.
API 2.0 is changing the offset of strings? Some confusion on what that will mean.
Using constants in the app, can it be decompiled and be seen? Important strings should be obfuscated.