Let us learn how to write a simple Basic4android program


  1. As this is a new program we should first set its location by choosing File - Save. It is highly recommended to save each project in its own folder. Create a new folder: "Example", open the folder and save the program as "First Program".
  2. Then Click on Project- Package Name

The package dialog will appear (empty):

Each Android application is identified by a unique package string. This is a string built of several parts separated with periods. The string should include at least two parts. You cannot install two applications with the same package on one device. Note that you can always change the package name (and the label) under tools menu.

- Enter a package name. Next you will be asked to enter the application "label". This is the application name that the user will see.
- Then Click on OK

 

  1. Click on the Button as shown below.

  1. Enter a package name in ApplicationLabel as shown below. This is the application name that the user will see.

  1. Write the following code under Sub Activity_Create: Code:

  1. Press F5 or Run button to compile and run your program to the emulator. Your program will now be compiled and installed to the emulator:


The emulator is significantly slower than a real device. In many cases it is more convenient to work with a real device as the installation is much faster. Note that you can always redeploy your program. There is no need to close the running program on the emulator.

Installing Android Emulator<< Previous
Next >>Example Android app

Our aim is to provide information to the knowledge seekers


comments powered by Disqus




Footer1