April 4, 2018

Sneak peek at Red on Android

Here is a short overview of the implemented features so far for Red/View backend on Android:

The source code for that Android test app is available here.

Implemented features so far:
  • New java bridge for Android
  • Full set of Red/View widgets supported (some still require extra work)
  • Draw & Shape dialects fully supported
  • Compatibility with Android GUI themes
  • Device-independent coordinate system
  • Updated APK building toolchain for targeting API 23+ Android systems
  • Improved ARM backend, support for ARMv7+
  • Android OS support ranges from 5.0 to 8.1 (tested on a Pixel 2)

The new java bridge replaces the old prototype built a few years ago, the low-level JNI bridge has been kept as is. This new bridge is optimized for performance, and allows efficient bindings from Red/System to the Android API in Java.

Those features were implemented in about a month and half in August/September 2017. We have delayed the continuation of that work, as we need to focus our resources on higher priority tasks for now, like Red/C3 and full I/O support. Once 0.7.0 will be out, we should have some resources available to resume this work. As a reminder, the current work on Android is done in a private repository, in order to keep control over the communication about Red on Android, as we want to maximize the announcement effect on that very important milestone. This private repo will be opened to a group of selected developers in our community once we resume the work on it, in order to help with testing and fine-tuning.

About the Tiger demo, it's a Draw version of the famous SVG tiger. It has many complex shapes, so it is particularily intensive to render in realtime, as in the above animation. From what we have noticed so far, it is CPU-bound on most (if not all) Android devices, so the rendering speed varies according to your device raw performance. We did some simple benchmarks with raw Java 2D vector graphics using the same Android API as Draw, Java code performed only 12% faster than our Draw code. This is an excellent result at this point, and hints that we can achieve great performance for 2D rendering in future versions. Here is the same demo running on a Xiaomi Mi Mix, which has a bigger display and is quite faster than the Nexus 5 used in the first video:

Here is a non-exaustive list of features to add or issues to address in order to complete Android backend:
  • Font and Para objects support
  • Menus support
  • List widgets elements have fixed sizes so far
  • Text-list has fixed height
  • Area widget needs to be completed
  • User-defined list widget
  • Camera aspect ratio correction required
  • Camera control
  • Transition effects between panels
  • Fast 2D sprites and scrolling support (for 2D games)
  • Red GUI console support
  • Common hardware sensors support
  • Bluetooth support
  • QR code reading and generation library
  • Contacts database access
  • Intents access
  • Developer keys management
  • Permission system support
  • Extra application types support:
    • desktop widget
    • headless service
    • wearable
    • TV

We are really excited by how quickly and smoothly was this first part of the work achieved, so this bows well for the remaining parts. As you know, we have a very heavy schedule this year, so we really need the full support of the Red community, and beyond, in order to accomplish it all and finally make the tool we all dream about, come true!


  1. This is too cool! I have to stop myself drooling on the keyboard! Well done, Nenad and team.

  2. Oh Yeah, Doc & Team. You've come a long way.

  3. One of my dreams is coming true!

  4. Great to see Red/Rebol making progress on Android!

  5. Now I wish I had an Android phone ;p

  6. I come from China. I like what you do. It's very very cool.

  7. I've been focussed on many other things than Red, lately.
    But obviously, I've missed A LOT of things!
    Congratulations, Nenad and the gang, for the impressive work!!

  8. 3 - years later - very little progress made...

  9. Errors....

    C:\Users\Alcova2\Desktop\Red>red -c -t Android eval2.red

    -=== Red Compiler 0.6.4 ===-

    Compiling C:\Users\Alcova2\Desktop\Red\eval2.red ...
    *** Compilation Error: undefined word font!
    *** in file: C:\Users\Alcova2\Desktop\Red\eval2.red
    *** near: [font! [
    name: "Arial"
    size: 11
    color: white
    anti-alias?: no
    font-A: make font! [
    name: "Times New Roman"
    size: 15
    color: red
    style: [bold italic underline]
    anti-alias?: yes
    img1: make

  10. The Android branch went stale for quite a while, but then got some serious updates. We haven't yet prioritized it on our new roadmap, but work is still being done on all fronts in Red.


Fork me on GitHub