Tutorials & Examples

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

RDC - Simple way to create your own back-end database

Remote Database Connector (RDC) is a middleware web server that allows you to easily connect your Android app to any type of remote database server.
Usually you will use it with a database...
 

Using POP3 to communicate with Android devices

Many developers face the challenge of sending data to remote devices. These devices can be at times offline, sleeping or without proper network coverage.
There are several possible solutions. The...
 

Attachments

  • MailParser.zip
    6.5 KB · Views: 2,676

Android Network Tutorial

This is an old tutorial. All new implementations of network solutions should be based on AsyncStreams.

The Network library allows you to communicate over TCP/IP with other computers or...
 

Attachments

  • NetworkExample.zip
    23.7 KB · Views: 7,571
Last edited:

Collecting tips - Beginners wanted!

I want to collect useful tips for developers who are starting to develop with Basic4android.
I'm deeply familiar with Basic4android and therefore not always aware of difficulties that new users...
 

Classes tutorial

Basic4android v2.00 adds support for classes modules.

Classes definition from Wikipedia:
In object-oriented programming, a class is a construct that is used to create instances of...
 

Attachments

  • Draw.zip
    7.1 KB · Views: 2,350
Last edited:

Android Wifi-Direct Tutorial

Android 4+ devices support Wifi Direct (Wifi P2p). Wifi Direct allows you to connect two devices over wireless without an access point. It is similar to Bluetooth with a much extended range and...
 

Attachments

  • WifiDirectExample.zip
    8.7 KB · Views: 16,781

Android Text To Speech example

Android can synthesize and play text.
Using the TTS library you can easily add this feature to your application.

tts_1.png


B4X:
Sub Process_Globals...
 

Attachments

  • TTSExample.zip
    6.2 KB · Views: 31,226
  • TTS.apk
    69.8 KB · Views: 3,632

Supporting multiple screens - tips and best practices

This is an old tutorial. I recommend to instead watch the visual designer video tutorial: https://www.b4x.com/etp.html

There are several features in B4A that help you target Android...
 
Last edited:

Android based Closed Circuit TV (CCTV) example

Attachments

  • CCTVServer.zip
    30.1 KB · Views: 4,261
  • CameraCCTVClient.zip
    10.3 KB · Views: 4,123
Last edited:

Android views animation tutorial

The Animation library allows you to animate views.
These small animations are really nice and can affect the user overall impression of your application.

The attached program demonstrates the...
 

Attachments

  • AnimationExample.zip
    10.6 KB · Views: 6,456
  • Animation.apk
    77.1 KB · Views: 2,767

Material Design 2 - Using the AppCompat library

Note: You should use B4A 6.0 or above for this tutorial.

In the first Material Design tutorial we created a simple app with Material Design for Android 5.0 (Lollipop) devices. But what about...
 

Attachments

  • AppCompatExample1_2.0.zip
    8.1 KB · Views: 2,312
  • AppCompatExample2_2_0.zip
    8.3 KB · Views: 2,793
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:

Intent Filters - Intercepting SMS messages in the background

Old tutorial. Don't use services. Use receivers.
Broadcast receivers are program components that can handle broadcasted messages. These messages usually notify about a system event.

There...
 
Last edited:

TabHost tutorial

Last edited:

Android JSON tutorial

JSON format is a a format similar to XML but usually it is shorter and easier to parse.
Many web services now work with JSON. JSON official site: JSON

Using the new JSON library, you can...
 

Attachments

  • JSONExample.zip
    5.2 KB · Views: 5,946
Last edited:

Take pictures with the internal camera

It is recommend to use the new CameraEx class. It provides more functionality.
The new Camera library allows you to take pictures using the back facing camera.

The following steps are...
 

Attachments

  • CameraExample.zip
    5.7 KB · Views: 10,137

Starter Service - Consistent & Single Entry Point

One of the challenges that developers of any non-small Android app need to deal with, is the multiple possible entry points.

During development in almost all cases the application will start from...
 
Last edited:

Installing Basic4android and Android SDK

Last edited:

SQLiteLight four simple SQLite projects

Some users asked here for a simple SQLite project as an example to make their first steps in SQLite.
The already existing examples seem beeing somewhat complicated for beginners.

These...
 

Attachments

  • SQLiteLight1.jpg
    SQLiteLight1.jpg
    18.6 KB · Views: 6,068
  • SQLiteLight2_1.jpg
    SQLiteLight2_1.jpg
    41.1 KB · Views: 5,879
  • SQLiteLight2_2.jpg
    SQLiteLight2_2.jpg
    20.1 KB · Views: 5,148
  • SQLiteLight2_3.jpg
    SQLiteLight2_3.jpg
    16.4 KB · Views: 5,040
  • SQLiteLight2_4.jpg
    SQLiteLight2_4.jpg
    32.3 KB · Views: 5,419
  • SQLiteLight1.zip
    130.9 KB · Views: 280
  • SQLiteLight2.zip
    204.2 KB · Views: 245
  • SQLiteLight3.zip
    230.8 KB · Views: 234
  • SQLiteLight4.zip
    229 KB · Views: 268
Last edited:

Conditional Compilation & Build Configurations

B4A v3.80 adds support for conditional compilation.

From Wikipedia:
In computer programming, conditional compilation is compilation implementing methods which allow the compiler to...
 
Last edited:
Top