Installing Android Studio

In order to use the android application features you must first download Android Studio and then open Android Studio to complete the installation. After the installation is complete you can create a new Android project in Android Studio, making sure to select the Include C++ support and the Android SDK 21 (Lollipop 5.0) options as shown below.

This is an image showing the c++ selection option

This is an image showing the sdk selection option

Continue following the prompts in the output section at the bottom of the Android Studio environment to install the missing Software Development Kit (SDK), Native Development Kit (NDK), and CMake tools.

In addition to Android Studio, you will also need to make sure that you have the Java 8 update 171 installed on your computer.

Setting Up Your Android Device

Click the following link for more information on enabling developer options and debugging

After the Android device is set to enable USB debugging, you will need to set up your operating system to detect the device.

Click the following link for more information regarding how to setup and connect your Android Device.

Sending Your Project to the Android Application

After you have installed Android Studio, the Java 8 update 171, and finished setting up your Android device, you are ready to connect the device to your computer via USB and send your project to the Android Application. The Quorum program that you are sending to the Android Application needs to use the Game class to work properly on Android devices. When your program is complete, simply plug the device in, right click on your Project in the side pane in the Quorum development environment, and select “Send to Android Application” as shown:

This is an image showing the send to Android Application selection option

Your Quorum project should now appear on the Android device’s screen as an application labeled “Default.” Click on the application “Default” and your project will run on the Android Device. If you have to make any changes to the project in Quorum, then you will need to delete/uninstall the existing “Default” Android application on the device before resending the edited project to the Android Application.

Practice Sending a Game Project to the Android Application

Let's try sending a program to an Android device and then running that program as an Android Application. We will start by creating a simple Game Project like the one shown below. This game will create a teal square, 100 pixels by 100 pixels, positioned 100 pixels up and 100 pixels to the right of the bottom left hand corner of the screen. The square will then rotate 30 degrees every second.

use Libraries.Game.Game
use Libraries.Game.Graphics.Color
use Libraries.Game.Graphics.Drawable

class Main is Game
   Color color
   Drawable drawable
   action Main
       StartGame()
   end
   action CreateGame
       drawable:LoadFilledRectangle(100, 100, color:Teal())
       drawable:SetPosition(100, 100)
       Add(drawable)
   end
   action Update(number seconds)
       drawable:Rotate(30 * seconds)
   end
end

You can test the project in Quorum first to make sure that everything runs as expected (there are no bugs) before sending the project to the Android Application. After everything is running correctly, you can send the game to the Android Application by following the instructions above which include right clicking the project name in the side pane of the Quorum Development Environment and selecting "Send to Android Application." The program will show up as an application labeled "Default" on the device with the output on the screen of the Android Device matching the output from when you ran the project using the Quorum development environment.

The output from the above example should look similar to this ( with the square demonstrating a rotating action).

This is an image shows the output from an example game.