The Basics: How do I Create Hello World on Android?
This lesson describes the very basic steps of creating an application that runs on Android via LiveCode. Screen captures and sample code are provided.
The lesson bridges the gap between installing the Android development environment (covered in lessons: How do I Become an Android Developer on a Mac? and How do I Become an Android Developer on a PC?) and implementing the first LiveCode application that runs on an Android device. The code is very elementary and the steps are very detailed, focusing primarily on the mechanics of implementation and deployment.
Note: This lesson assumes that you have already installed and configured the necessary packages to begin developing software for the Android platform.
Open LiveCode and Create a new Mainstack
Change the Name of the Mainstack
Change the Name of the Button
Write the Code
Right click on the button you just renamed and select Edit Script. The Script Editor window opens, allowing you to write the code that is to run on your Android application. Add the following code into the editor window:
answer "Hello World!" with "Ok"
Then select the Apply button. You have now implemented your Android application and are ready to launch it on an Android device.
Launch the Android Device Emulator or Connect a Physical Device
In this lesson we are using the emulator to simulate an Android device. Launch the Android emulator from your Android SDK and AVD Manager. Lessons: How do I Become an Android Developer on a Mac? and How do I Become an Android Developer on a PC? would have shown you how to configure and start your simulated Android device.
Note: The emulator needs to be running for LiveCode to launch your application.