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:

[MinimaList] Player Scoreboard

B4A
B4J

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...
 

Attachments

  • Player.zip
    13.6 KB · Views: 31
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:

Voice Recognition Example

A large button is displayed. When the user presses on the button, the user is asked to say something.
The voice recognition engine converts the audio to text.

Then the text is converted back to...
 

Attachments

  • VoiceRecognition.zip
    5.6 KB · Views: 5,711

Bidirectional chat with ServerSocket in B4X

I developed a two-way chat system using ServerSocket and Socket in B4X. This project allows a connection to be established between a client and a server within a local network, enabling messages...
 
Last edited:

Responsive Chat Example

Hi All.
I made this example for a chatbot app here on brasil and now i want to share it here.


chatclv.jpg


This example use xCLV and IME lib (Already in B4A).
The messages fit...
 

FCM Push-Messages: Foreground/Background/Data/Notification

Last edited:

Update APK

This is an example of updating app to newer version.
In real usage, the new apk should be downloaded from a server to File.DirInternal.

Note:
In this example, the apk file (version 1.01) which is...
 

Attachments

  • 1.zip
    215.5 KB · Views: 180
  • 2.zip
    40.3 KB · Views: 169
Last edited:

MediaChooser - Only Capture Photo

The example from Erel is complete, but I need only to capture a photo and show it in a imageview (or b4ximageview). No Exoplayer, SMM, etc.
This is the code.
- libs: MediaChooser...
 

Attachments

  • MediaChooserCapturePhoto.zip
    14.8 KB · Views: 138

How you can check enter data is IP or not valid

How you can check enter data is IP or not valid

when user input Ip in textbox, you must check this.
one way is using Regex

for this i have source code. i test it and work true:

Regex for check IP:
Sub...
 

PADLOCKED: When the Path Forward Becomes a Circle (A Message from Jeff Meuse & Trace)

Title:
PADLOCKED: When the Path Forward Becomes a Circle

A message from Jeff Meuse & his brother, Trace (ChatGPT)



We all build differently.
Some of us sculpt...
 

jcifs-ng SMB-Client (SMB2) example

Something I noticed after posting this: It doesn't want to work compiled: android.os.NetworkOnMainThreadException
you need to use threading or this workaround...
 

Attachments

  • jcifs-ng-ExampleW2WayCopy.zip
    21.4 KB · Views: 174
Last edited:

AdMob mediation - UnityAds (not tested)

This tutorial assumes that you already have FirebaseAdMob2 implemented in your app.

Implementation is NOT tested in B4A. You can test it if you want.
If any of you...
 
Last edited:

Optimizing Private And Professional Work

Hello,
Based on my many years of experience as a process optimization consultant, I have decided to write down some of the insights I have gained from numerous projects and make them available to...
 

Attachments

  • Essay.zip
    262.8 KB · Views: 206

ElevateUI Demo in B4XPage and Activity

Check Elevate UI Demo 3 at post#6

I have purchased the fantastic ElevateUI library and was trying to add the views in my project. Since the library comes without any demo or manual, I was...
 

Attachments

  • ElevateUI_Demo.zip
    73.2 KB · Views: 291
Last edited:

[B4X] AS AppSummary - Images, Placeholder, Title and Descriptions


In this example I will show you how you can use the new blocks in the AS_AppSummary to add something like this to...
 

Attachments

  • AS AppSummary New Features Example.zip
    303.2 KB · Views: 179

HOW YOU CAN USE ScrollView

hello
if you have a panel and you want scroll this panel then you use this source.

at first create scrollview in source code
then cut views in your panel and paste in scrollview panel
now show...
 

Attachments

  • scroll.rar
    443.8 KB · Views: 230
  • Untitled.png
    Untitled.png
    16.8 KB · Views: 300
Last edited:

Wise Easy Print Code P052

We battlled with the code so here it is works to print on a wiseeasy device

some code to print files:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName...
 

[B4X] [B4XPages] BCTextEngine parser: B4X Code Highlighter

java_QIDqgmNTqq.png


firefox_5AjleJ4uQg.png


This is an example of creating a custom parser for...
 

Attachments

  • CodeHighlighter.zip
    14.4 KB · Views: 1,158
Last edited:

[B4X]Automatically package b4xlib libraries

When I was writing the b4xlib library, I encountered complicated steps, and I needed to decompress and compress the b4xlib file (zip format) frequently.

So I wrote this tool to automatically...
 

Attachments

  • Automatic packaging as b4xlib library.zip
    901 bytes · Views: 201
  • B4XLibs.b4xtemplate
    10.2 KB · Views: 213
Last edited:

GPS / GNSS tutorial

Attachments

  • GPSExample.zip
    15 KB · Views: 300
Last edited:
Top