Skip to content

Latest commit

 

History

History
53 lines (53 loc) · 2.49 KB

android.md

File metadata and controls

53 lines (53 loc) · 2.49 KB

Android

Enguage has been an Android app since 2013, and while it is still (only just!) on the Play store, it is probably a better bet to built from the source: the Enguage jarfile and the Android specific Assets.java file to access the Android specific assets/ directory. Enguage is developed in Eclipse, as a platform independent IDE, these instructions are for migrating the resultant jarfile into Android Studio 4.1.3, build March 10, 2021.

How to build a simple Enguage Android app

Firstly, it seems that AndroidStudio SDK only use Java 1.8, so you will need to install this, otherwise you will get complaints about your jarfile needing to be version 52. To check which version you have, type in a shell:

  • javac -version
Assuming you need to up/downgrade, in a shell:
  • sudo apt update
  • sudo apt install openjdk-8-jdk-headless
  • sudo update-alternatives --config javac
You might also want to clear out the (old) class files from the Enguage repo:
  • find . -name "*.class" -exec rm {} \;
Then, create the Enguage jarfile for android (this is without the Assets class):
  • make android
Now you're ready to move across to AndroidStudio. Resources for the app are [in this repo](../opt/android.app).
  • Create a new Android project, selecting "Empty Activity". In this example I've called the project Enguage. Build and run it on your device to make sure its ready.
Now you're ready to copy across the various assets from the Engauge repo into the Android Studio project:
  • Copy the content of MainActivity.jv from opt/android.app/src.main/java.com.yagadi/ into MainActivity.java;
  • Copy the Assets.jv file into $HOME/AndroidStudioProjects/Enguage/app/src/main/java/com/yagadi, as Assets.java;
  • Ceate a new directory $HOME/AndroidStudioProjects/Enguage/app/libs
  • Copy into this the jafile, lib/anduage.jar
  • Locate this in the Android Studio (try the 'breadcrumbs' at the top, if it is not in the Project Explorer.) Right click on this in Android Studio and select "Add as library"
  • Create an assets folder for the Enguage repertores. Right-click in Android Studio -> New -> Folder -> Assets Folder This will be, by default created in AndroidStudioProjecct/Engauge/app/src/main
  • Copy into this the content of etc/, i.e. config.xml and rpt/
Following this there may be XML resources to copy across, such as:
  • Colors,
  • Strings, and
  • Layouts
If I've missed anything, please feel free to 'remind' me. Thanks! :)