No description
Find a file
2021-09-17 12:05:13 +02:00
.idea cleanup 2021-09-13 21:10:53 +02:00
app Improved navigation & startup time 2021-09-17 12:05:13 +02:00
gradle/wrapper Added README.md 2021-09-13 20:36:50 +02:00
.gitignore Improved navigation & startup time 2021-09-17 12:05:13 +02:00
android_elixir.png Added README.md 2021-09-13 20:36:50 +02:00
app.jpg Added README.md 2021-09-13 20:36:50 +02:00
build.gradle Added README.md 2021-09-13 20:36:50 +02:00
gradle.properties Added README.md 2021-09-13 20:36:50 +02:00
gradlew Added README.md 2021-09-13 20:36:50 +02:00
gradlew.bat Added README.md 2021-09-13 20:36:50 +02:00
icon.jpg Added README.md 2021-09-13 20:36:50 +02:00
LICENSE.md Added README.md 2021-09-13 20:36:50 +02:00
README.md Fixed Android 10 and x86_64 support 2021-09-15 18:20:53 +02:00
run_mix Added locale detection & reduced apk size by 5mb 2021-09-16 14:49:43 +02:00
settings.gradle Added README.md 2021-09-13 20:36:50 +02:00

TodoApp Android: An Android Sample App

This Android Studio project wraps the Desktop Sample App to run on an Android phone.

How to build & run

  1. Install Android Studio + NDK.

  2. Go to "Files -> New -> Project from Version Control" and enter this URL: https://github.com/elixir-desktop/android-example-app/

  3. Connect your Phone to Android Studio

  4. Start the App

Known todos

Initial Startup time is slow

Running the app for the first time it will extract the full Elixir & App runtime at start. On my Phone this takes anywhere from 10-20 seconds. After that the startup is releatively quick.

Menus and other integration not yet available

This sample only launch the elixir app and shows it in an Android WebView. There is no integration yet with the Android Clipboard, sharing or other OS capabilities. They can though easily be added to the Bridge.kt file when needed.

Other notes

  • The current sample is using Android API 23 and above

  • The Erlang runtime is for ease of use embedded in this example git repository. The native runtimes for Android ARM, ARM64 and X86_64 and the exqlite nif are are generated using the Desktop Runtime repository.

  • Android specific settings, icons and metadata are all contained in this Android Studio wrapper project.

  • Bridge.kt and the native library are doing most of the wrapping of the Elixir runtime.

Screenshots

Icons App

Architecture

App

The Android App is initializing the Erlang VM and starting it up with a new environment variable BRIDGE_PORT. This environment variable is used by the Bridge project to connect to a local TCP server inside the android app. Through this new TCP communication channel all calls that usually would go to wxWidgets are now redirected. The Android side of things implements handling in Bridge.kt.