Android Tutorial B4A Beginners Guide

This guide is obsolete ! It is no more updated.
Please use the B4X Booklets.


Here is a Beginner's Guide in pdf format.
The source code for the example programs is included.

All suggestions, remarks and typo reports are welcome.

To know what vesion you have, look at the lower right corner of the cover page there is an Edit number.
Latest version Edit 3.3

Best regards.


EDIT 2016.10.26 Edition 3.3
Updated with the new B4A V6.30 features.
A big thank you to widget who sent me a complete review with suggestions and typos.
Almost all suggestions have been added.

EDIT 2015.12.08 Edition 3.2
Updated with the new B4A V5.50 features.

EDIT 2015.10.14 Edition 3.1
Updated with the new B4A V5.20 features.

EDIT 2015.07.26 Edition 3.0
Updated with the new B4A V5.02 features.

EDIT 2014.06.04 Edition 2.9
Updated with the new B4A V3.80 features.
Amended some typos.

EDIT 2014.05.07 Edition 2.8
Updated with the new B4A V3.50 features.
Amended some typos.

EDIT 2014.02.05 Edition 2.7
Updated with the new B4A V3.20 features.

EDIT 2013.10.13 Edition 2.6
Updated with the new B4A V3.00 features.

EDIT 2013.05.19 Edition 2.5
Updated with more recent Android SDKs.
Updated to Basic4Android Version 2.70
Added some code snippets to B4A Code Snippets.

EDIT 2013.01.20 Edition 2.4
Minor update with the changes of B4A Version 2.5

EDIT 2012.12.27 Edition 2.3
Updated to Basic4Android 2.3
Updated some chapters

EDIT 2012.08.30 Edition 2.2
- Updated to B4A 2.02
- Removed chapters Keywords, Views and Collections moved them in a separate guide Keyword_Views.pdf
- Added Chapter 12. Tools
- Chapter 12 Example Programs becomes 13
- Chapter 13 Basic Language becomes 14
- Chapter 14 Basic Graphics / Drawing becomes 15
- Chapter 15 Keywords removed
- Chapter 16 Views removed
- Chapter 17 Collections rmoved
- Chapter 18 VB6 versus B4A becomes 16
- Chapter 19 FAQ's becomes 17
- Chapter 20 Glossary becomes 18
- Added new chapters to FAQ'schapter
- Chapter 17.39 not yet finished

Two new Guides have been added:
- Keyword / Views / Collections these chapters were in the Beginner's Guide before
- B4A Code Snippets, it's a collection of code snippets I took from the forum.

EDIT 2012.04.11 Edition 2.1
- Added chapter 5.3 Screen Orientations
- Added chapter 6.4 Exchanging files with PC
- Added chapter 8.9 Designer Script
- Added chapter 13.5.3 Calling a Sub from another module
- Added chapter 13.11 Lists
- Added chapter 13.12 Maps
- Added chapter 17 Collections
- Chapter 17 becomes 18
- Chapter 18 becomes 19
- Added chapter 19.25 Detect screen orientation
- Added chapter 19.26 Some functions don't work in Activity_Pause
- Added chapter 19.27 Calling internal Calculator
- Added chapter 19.28 Get the Alph / Red / Green / Blue values

EDIT 2012.03.11 Edition 2.0
- Amended some errors
- Updated to B4A version 1.8
New chapter
- Working with different screen sizes / number of layouts

Removed chapters
- SQL moved to the User's Guide
- GPS moved to the User's Guide

EDIT 2012.01.01 Edition 1.6
- Added the Widget tutorials.
- Amended some errors.

EDIT 2011.12.25 Edition 1.5
- Added the GPS Example program with some explanations of the code.
- Added some subchapters inspired by forum questions.

Edit: 2011.11.01 Version 1.4
New chapters:
- 8.7 The Abstract Designer
- 8.8 Adding views by code
- 12.5 GPS (a new GPS program will be added in the next update)
- 13.7 Basic Language / Events
- 13.10 Basic Language / Files
- 18.xx some new FAQ's

Edit: 2011.08.29 Version 1.3
New chapter:
- 18 FAQ's

Edit: 2011.08.15 Version 1.2
Above chapters have been added.

Edit: 2011.06.12 Version 1.1
Still missing chapters:
Modules
Example Programs
- ScrollView example
- Database example
Basic Language
- String manipulations
- Timers
Graphics
 
Last edited:

JonPM

Well-Known Member
Licensed User
Longtime User
Although he may not want to officially use it the community may still want it. Post a link or zip and I'm sure many people will use it
 

BasicBert

Member
Licensed User
Longtime User
Vader, don't be disappointed and let "us" have a look and see if we like it.
It would be nice to have different choices and sources of help.
Keeping up with all updates will be hard work though, so be sure that you can.

Sent from my HTC OneX with Tapatalk.

Edit : I've looked at your document and like it. A simple example is something I miss a lot in the docs i've seen.
There's still a lot to do, but I like the structure.
Please go on...
 
Last edited:

JonPM

Well-Known Member
Licensed User
Longtime User
I put a zip in my first post for feedback.

I think this is a great resource, do you plan on keeping it up to date? If so, I would recommend you start a new thread to share this with everyone, that way you can keep it updated in that thread. This is definitely something I will be using while I code.
 

TonySD

New Member
Licensed User
Longtime User
Begginer's guide v2.40 & source code examples

Hi and thanks for this excellent product!

I'm finally studying the beginner's guide v2.4
I found out that the example programs as described in the pdf file are not exactly the same as in SourceCode.
In particular in OneLayoutStreched in pdf code is:
B4X:
Sub GetDevicePhysicalSize As Float
Dim lv As LayoutValues
lv = GetDeviceLayoutValues
Return Sqrt(Power(lv.Height / lv.Scale / 160, 2) + Power(lv.Width / lv.Scale
/ 160, 2))
End Sub
and in SourceCode folder code is:
B4X:
Sub CheckDeviceType
   ' check device type, used to define text sizes
   ' should be completed if necessary
   
   lv = GetDeviceLayoutValues
   
   Select lv.Scale
   Case 2
      DeviceType = "Smartphone 5"
      TextSizeRatio = 1.5
...
...
also TestLayouts has minimal differences.
Maybe older versions in SourceCode directory?

TIA
 

adex1

Member
Licensed User
Longtime User
A new edition of the Beginner's Guide Edition 2.7 is available.
Updated for B4A Version 3.20

Best regards.
Hi klaus,

Thanks for your time and effort on the version 2.7 released.

Why can not make the source code available on GIT HUB or Code.google so that other people can contribute to it?
 

klaus

Expert
Licensed User
Longtime User
All the code projects supplied with the Beginner's Guide and the User's Guide are example codes to illustrate different subjects.
All Basic4Android users can use them and modify them to their needs.
I don't think it would be really useful to put these onto GIT HUB nor Code.google which are hudge containers.
I'm sure that it is easier to search for a specific code in this forum rather than in much more general and big forums.
That's the reason why the Code Snippets subforum was created.
 
Last edited:
Top