Table of contents 2 B4X Getting started
1 B4X platforms .............................................................................................................................. 6
1.1 B4A Android ....................................................................................................................... 6
1.2 B4i Apple iOS ..................................................................................................................... 7
1.3 B4J Java / Windows / Mac / Linux / Raspberry PI ............................................................. 8
1.4 B4R Arduino / ESP8266 ..................................................................................................... 8
1.5 B4XPages ............................................................................................................................. 8
2 Getting started .............................................................................................................................. 9
2.1 Installation of the platforms ................................................................................................. 9
2.1.1 B4A .................................................................................................................................. 9
2.1.2 B4i .................................................................................................................................... 9
2.1.3 B4J ................................................................................................................................... 9
2.2 Setup for Additional Libraries ........................................................................................... 10
2.3 Configure paths .................................................................................................................. 11
2.3.1 B4J ................................................................................................................................. 11
2.3.2 B4A ................................................................................................................................ 12
2.3.3 B4i .................................................................................................................................. 12
2.4 Select the IDE language ..................................................................................................... 13
2.5 Connect to a real device ..................................................................................................... 13
3 My first program ........................................................................................................................ 14
3.1 Project setup ....................................................................................................................... 15
3.2 B4J version ......................................................................................................................... 18
3.2.1 Set the Package Name .................................................................................................... 18
3.2.2 Set the Form size ............................................................................................................ 19
3.2.3 Create the layout ............................................................................................................ 20
3.2.4 Write the code ................................................................................................................ 33
3.3 B4A version ....................................................................................................................... 38
3.3.1 Set the ApplicationLabel ................................................................................................ 39
3.3.2 Set the Package name ..................................................................................................... 40
3.3.3 Create the layout ............................................................................................................ 41
3.4 B4i version ......................................................................................................................... 47
3.4.1 Set the ApplicationLabel ................................................................................................ 47
3.4.2 Set the Package name ..................................................................................................... 48
3.4.3 Create the layout ............................................................................................................ 49
4 SecondProgram .......................................................................................................................... 55
4.1 B4A version ....................................................................................................................... 56
4.2 B4i version ......................................................................................................................... 72
4.3 B4J version ......................................................................................................................... 76
5 Getting started B4A................................................................................................................... 80
5.1 Installing B4A and Android SDK ...................................................................................... 80
5.2 B4A Configure Paths in the IDE ........................................................................................ 80
5.2.1 Configure Additional libraries folder ............................................................................. 81
5.3 B4A Choice of the language .............................................................................................. 82
5.4 B4A Connecting a real device............................................................................................ 83
5.4.1 Connection via USB ....................................................................................................... 83
5.4.2 Conneting via B4A-Bridge ............................................................................................ 84
5.4.2.1 Getting started with B4A-Bridge ........................................................................... 84
5.4.2.2 Run B4A-Bridge on your device............................................................................ 85
5.4.2.3 Wireless connection ............................................................................................... 86
5.5 My first B4A program (MyFirstProgram.b4a).................................................................. 88
5.6 Second B4A program (SecondProgram.b4a) .................................................................. 112
6 Getting started B4i .................................................................................................................. 127
6.1 Installing B4i .................................................................................................................... 128
6.1.1 Installing B4i ................................................................................................................ 128