Tutorials & Examples

Android development starts here. Please do not post questions in this sub-forum.

[B4X] Documentation Booklets

The B4X documentation booklets are available in PDF format, Download Link.
All files are included in the zip file in the link above, pdf booklets and all the source code.

You can also...
 
Last edited:

[B4X] "Code Smells" - common mistakes and other tips

"Code smells" are common patterns that can indicate that there is a problem in the code. A problem doesn't mean that the code doesn't work, it might be that it will be difficult to maintain it or...
 
Last edited:

[B4X] Features that Erel recommends to avoid

Many things have changed in B4X and also in the underlying platforms. I will try to list here all kinds of (old) features that have better alternatives.
B4X is backward compatible so these...
 
Last edited:

Connect Android to MySQL Database Tutorial

A new more powerful framework is now available: jRDC2.

This tutorial explains the basic concepts required for creating a connection between Android device and a remote server. In this...
 

Attachments

  • MySQL.zip
    8 KB · Views: 17,158
Last edited:

B4A-Bridge a new way to connect to your device

There are several options to develop with B4A:
- Android emulator or a VM.
- Connect to a real device in USB debugging mode
- Connect to a real device with B4A-Bridge.

I recommend starting with...
 

Attachments

  • upload_2016-9-29_9-29-57.png
    upload_2016-9-29_9-29-57.png
    14.3 KB · Views: 6,063
Last edited:

B4A Change Log (versions history)

Last edited:

(old) Google Maps Android v2 tutorial

Attachments

  • GoogleMaps.zip
    17.8 KB · Views: 11,422
Last edited:

Remote Database Connector (RDC) - Connect to any remote DB

Last edited:

Connect Android to MS SQL Server Tutorial

Attachments

  • MsSQL.zip
    6.3 KB · Views: 3,242
Last edited:

HttpUtils2 - Web services are now even simpler

Attachments

  • FlickrViewer.zip
    10.7 KB · Views: 9,000
  • HttpUtils2.zip
    8.5 KB · Views: 11,266
Last edited:

Android Bluetooth / BluetoothAdmin Tutorial

Better implementation based on B4XPages:
Tutorial was rewritten in April 2018.
We will create...
 

Attachments

  • Bluetooth.zip
    12.4 KB · Views: 6,709
Last edited:

SQL tutorial

Update 2018:

New video tutorial:


The source code is available here...
 

Attachments

  • SQL.zip
    8.1 KB · Views: 11,858
Last edited:

Hello world - Installing Android Emulator

ListView tutorial

Don't use ListView.
Use xCustomListView - it is more powerful, easier to work with and cross platform.
 
Last edited:

GPS tutorial

This example shows how to work with the GPS library.

upload_2016-6-23_9-56-49.png


The GPS object is declared in the Starter service. It is easier to put the GPS in a service and not in an Activity as the...
 

Attachments

  • GPS.zip
    8.1 KB · Views: 6,798
Last edited:

OSMDroid - MapView for B4A tutorial

Attachments

  • 01 - SimpleMap.zip
    5.8 KB · Views: 4,637
Last edited:

Android Serial tutorial

Attachments

  • SerialExample.zip
    6.3 KB · Views: 10,545
Last edited:

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...
 
Last edited:

DBUtils - Android databases are now simple!

Attachments

  • DBUtils.zip
    14.4 KB · Views: 5,489
Last edited:

Text files

Many applications require access to a persistent storage. The two most common storage types are files and databases.
We will cover text files in this tutorial.

The predefined Files object has...
 

Installing Basic4android and Android SDK

Last edited:

Service Modules

This is an old tutorial. Most of the information here is no longer correct.



Basic4android v1.2 adds support for Service modules.
Service modules play an important role in...
 
Last edited:

Android Process and activities life cycle

New video tutorial:



Lets start simple:
Each B4A program runs in its own process.
A process has one main thread which is also named the UI thread which lives as long as the...
 
Last edited:
Top