Tutorials & Examples

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

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

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

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: 353
  • LiveWallpaper.zip
    8.9 KB · Views: 354
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,796
  • ExcelWorkbook.zip
    7.1 KB · Views: 2,253
  • B4i_LocalizatorExample.zip
    6.1 KB · Views: 1,462
  • Localizator.bas
    4.4 KB · Views: 2,211
  • B4A_LocalizatorExample.zip
    11.6 KB · Views: 1,767
  • B4J_LocalizatorConverterSource.zip
    10 KB · Views: 991
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,434
  • [B4i] Socket.io Simple Call Example.zip
    111.7 KB · Views: 1,129
  • [Server] Socket.io Simple Call Example.zip
    2.4 KB · Views: 1,360
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:

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:

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: 2,201
  • Library.zip
    403.1 KB · Views: 1,207
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: 291
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: 3,033
  • Uri.zip
    11 KB · Views: 2,811

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: 383
  • mpAndroidPieChartJO.zip
    9.9 KB · Views: 343
Last edited:

Exoplayer track video resolutions

Hello friends, i wanna share with you a code that can you use it to get video resolutions avilables in played video (m3u8,mp4 ...) and show it in listview to select one of this qualities; :
do not...
 

Attachments

  • video_qualities.jpg
    video_qualities.jpg
    37.9 KB · Views: 277

Simple function to convert Markdown Text to CSBuilder Format

This simple function converts Markdown-formatted text so that it can be used as CSBuilder.

This is particularly useful if, for example, you have created a text in MS Word with bold and...
 

Attachments

  • md2cs.zip
    9.6 KB · Views: 258
Top