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] 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:

[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:

B4Xgoodies_from_walt61 Online

Well,

As JamesGreaves requested,
"So do you not think it would be of value to have even something like @walt61 has created but online?"...
 
Last edited:

[B4X]How to Implement Lottie in B4XPages (AXrLottie B4A and iLotttie B4i)

This is B4XPages example for LOTTIE implementation on Android and iOS

B4A Implementation

Uses AXrLottie. Download the library and dependencies here...
 

Attachments

  • LottieB4XExample.zip
    102 KB · Views: 212
Last edited:

CustomFloatingMenuButton - B4A Library source code

The attached code shows how to create a Floating Menu Button, you can show the button by clicking on a button or a swipe gesture (right edge of the screen).

This is a guide that hopefully will...
 

Attachments

  • CustomFMB.apk
    277.8 KB · Views: 879
  • CustomFloatingMenuButton_SourceCode.zip
    15.4 KB · Views: 1,596
Last edited:

Conversion of B4A to B4XPages

Introduction

The conversion of the first of my B4A Apps to the newer B4XPages structure was not trivial and involved over 20 hours of research, overcoming misunderstandings, and finding...
 

Attachments

  • Section 1-2.pdf
    469.4 KB · Views: 887
  • Section 3 Step 1-11.pdf
    501.9 KB · Views: 781
  • Section 3 Step 12.pdf
    488.1 KB · Views: 685
  • Section 3 Step 13.pdf
    456.3 KB · Views: 819
  • Section 3 Step 14.pdf
    450.6 KB · Views: 650
  • Section 3 Step 15-16.pdf
    457.5 KB · Views: 745
  • Section 4-5.pdf
    393.4 KB · Views: 637

[B4X] AS FeatureRequest - Approved and implemented requests


In this example I show how easy you can display 2 pages, with the features that are under development and...
 

Attachments

  • AS_FeatureRequest Supabase Approved and implemented requests Example.zip
    181.8 KB · Views: 30
Last edited:

[B4X] AS FeatureRequest - Supabase as backend


In this example I show you how to use supabase as a backend for the AS_FeatureRequest quickly and easily...
 

Attachments

  • AS_FeatureRequest Supabase Example.zip
    179 KB · Views: 30
Last edited:

[MinimaList] Player Scoreboard

1731569459566.png

This example is a response to this thread.

You can click the labels to edit Player's name and score.
The results will be showed after click on OK.

Player's name cannot be...
 

Attachments

  • Player.zip
    14.5 KB · Views: 40

Using Camera2 with Zxing for live scan of 1D and 2D barcodes

I have used @Erel's sample project from here:


Have added a timer to get the preview bitmap every...
 

Attachments

  • core-3.3.2.zip
    493.6 KB · Views: 1,217
  • Camera2.zip
    16.5 KB · Views: 1,185
Last edited:

Android 14 / targetSdkVersion 34 and Services

B4A v13.0+ should be used with targetSdkVersion 34+.

Android 14 continues the longtime trend of making services less flexible and more difficult to use (converging to iOS background tasks...
 
Last edited:

[B4X] AS BottomActionSheet - Small Icon


In this example I will show you how you can add a small icon to an item and customize it to your needs.

A...
 

[B4A] Extended example of ContactsUtils to place shortcuts to contacts on the home screen

For some time now, it has not been possible to place short links to contacts on the home screen via the Contact Apps. Instead, the selected contact is always placed as a widget. However, since I...
 

Attachments

  • contact linking.zip
    10.6 KB · Views: 52

[B4X] AS Settings - ColorChooser Property


This setting allows users to select a color. For example, to change the main app color, which is a premium feature in...
 

Attachments

  • AS Settings ColorChooser Example.zip
    179.2 KB · Views: 65
Last edited:

TessBaseAPI ocr

hello, a small library of TessBaseAPI "tesseract4android-2.1.0" Ocr, you need to download tesseract4android-2.1.0.aar and junit-4.4.jar as Depends, for the tessdata languages...
 

Attachments

  • tess4.1.zip
    24 KB · Views: 640

Android Live Wallpaper tutorial

The user can set live wallpapers by long pressing on the home screen and choosing Wallpapers - Live Wallpapers.
Creating a live wallpaper is not too difficult.
A service is responsible for...
 

Attachments

  • WallpaperExample.zip
    18 KB · Views: 107
  • LiveWallpaper.zip
    8.9 KB · Views: 105
Last edited:

[B4X] Localizator - Localize your B4X applications

Localizator is a cross platform solution for strings localization.

The strings are defined in an Excel workbook.

SS-2016-07-07_17.00.16.png


They...
 

Attachments

  • B4J_LocalizatorExample.zip
    5.7 KB · Views: 1,556
  • ExcelWorkbook.zip
    7.1 KB · Views: 2,005
  • B4i_LocalizatorExample.zip
    6.1 KB · Views: 1,241
  • Localizator.bas
    4.4 KB · Views: 1,963
  • B4A_LocalizatorExample.zip
    11.6 KB · Views: 1,522
  • B4J_LocalizatorConverterSource.zip
    10 KB · Views: 751
Last edited:

Tips or Tricks for using Android Emulator

I want to share a few tricks when using the Android Virtual Device or Emulator.

1. Increase font and icon size
Go to Settings (gear icons) from drawer/desktop/slide down menu and choose...
 
Last edited:

[B4XPages] Admob Example

Check this other excellent example from @Jack Cole.

To help the new members to make money with B4A, I tried to compile all the relevant Admob code (except mediation) of the...
 

Attachments

  • b4xpages_admob_example6.zip
    57.8 KB · Views: 118
Last edited:

Running B4A and B4J under Linux with wine - fully functional

I have just managed to install B4A and make it run (including B4ASdkManager) on my Xubuntu 18.04 and, since I have lost two days and one night putting things together, I thought it will be a good...
 
Last edited:

[B4X] Simple audio call over internet with own TURN/relay server

Attachments

  • [B4A] Socket.io Simple Call Example.zip
    116.8 KB · Views: 1,182
  • [B4i] Socket.io Simple Call Example.zip
    111.7 KB · Views: 905
  • [Server] Socket.io Simple Call Example.zip
    2.4 KB · Views: 1,127
Last edited:

Introduction to the libGDX library

Introduction to the libGDX library

What is libGDX ?

libGDX is a game engine. As we saw in the first tutorial, a game engine provides a framework to create...
 
Last edited:
Top