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] 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
    178.9 KB · Views: 16
Last edited:

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: 47
  • LiveWallpaper.zip
    8.9 KB · Views: 43
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,509
  • ExcelWorkbook.zip
    7.1 KB · Views: 1,935
  • B4i_LocalizatorExample.zip
    6.1 KB · Views: 1,196
  • Localizator.bas
    4.4 KB · Views: 1,915
  • B4A_LocalizatorExample.zip
    11.6 KB · Views: 1,465
  • B4J_LocalizatorConverterSource.zip
    10 KB · Views: 692
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: 50
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,136
  • [B4i] Socket.io Simple Call Example.zip
    111.7 KB · Views: 859
  • [Server] Socket.io Simple Call Example.zip
    2.4 KB · Views: 1,083
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: 579

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:

B4A-Bridge source code

B4A-Bridge is made of two components. One component is running on the device and the other is embedded in the IDE.
The device side is the server side. It waits for connections and when a...
 
Last edited:

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,162
  • Camera2.zip
    16.5 KB · Views: 1,120
Last edited:

Offline Continuous Speech Recognition

This is a very old project which is unlikely to function correctly on newer versions of Android. The link to the project should still be active and if you want to use it for reference to...
 

Attachments

  • copyright.txt
    1.5 KB · Views: 1,950
  • Library.zip
    403.1 KB · Views: 940
Last edited:

Handle the soft keyboard with the IME library

Android has very good support for custom input method editors (IMEs).
The downside for this powerful feature is that interacting with the soft keyboard can be sometimes quite complicated.

This...
 

Attachments

  • IME_Example.zip
    14.8 KB · Views: 96
Last edited:

background voice recording

Hi..
I have created one activity that contains AudioRecorder using audiorecorder library.
i want to start and stop recording from background using service.
timer is not working to stop...
 

[Closed] Solutions to "The filename or extension is too long" error

This issue was solved with the B4A 13 Beta 6.

I saw many users (include me) with the problem "The filename or extension is too long", when try to compile the project with...
 
Last edited:

Align the AES encryption and decryption results between B4X and the .NET platform

A C# friend who uses MAUI to develop Android apps, but the friend works well, so I recommend him to use B4A, and he got started after a few hours of basic tutorials. He implemented a way to make...
 

Attachments

  • AES B4X and .NET is the same.zip
    142.4 KB · Views: 87
Last edited:

[B4X] AS Settings - Change Description Text on the fly


How to change the description text of a property:
B4X:
AS_Settings1.MainPage.GetProperty("ExportDatabase").Description =...
 

Getting file info using uri from content chooser or from received shared file - example

example of getting file property information from uri provided by content chooser or received file shared to the app. Curtesy of Erel’s example: Received Share. Shows File name, Mime Type...
 

Attachments

  • Screenshot_uriexample.jpg
    Screenshot_uriexample.jpg
    341.8 KB · Views: 2,707
  • Uri.zip
    11 KB · Views: 2,527

mpAndroidCharts - Various Charts using JavaObject

Have never done a B4A "wrapper" before making use of JavaObject only and thought I would see if I could get the PieChart of mpAndroidCharts implemented by using B4A's JavaObject only...
 

Attachments

  • mpChartLib.jar
    360.7 KB · Views: 177
  • mpAndroidPieChartJO.zip
    9.9 KB · Views: 155
Last edited:
Top