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:

[B4X] Class templates

*** This is a trick, a discovery by @aeric, really very useful ***

[B4A-B4J-B4i]


[This is a long post but the process is much simpler than it...
 

Attachments

  • 1758258608074.png
    1758258608074.png
    4.4 KB · Views: 36
Last edited:

[B4X] #CustomBuildAction

The #CustomBuildAction attribute allows running external programs during the compilation process.
The syntax is:
B4X:
#CustomBuildAction <compilation step>, command to run, zero or more arguments...
 
Last edited:

[B4X] Comment Links and #Macros

qHTNrUJnPQ.gif


Comment Links

Code comments can include clickable links. The following schemes are supported:

http(s):// - Link will be...
 
Last edited:

[B4X] B4X Forum Repository

Attachments

  • ForumExtractor.zip
    4.4 KB · Views: 117
Last edited:

Expandable list based on CustomListView

Last edited:

Libraries that do not support 16kb alignment?

Many have gotten the information about their Apps not aligned with the 16KB. Here is how to check which specific libraries are causing the issue

Note: You have to check for each app individually...
 

[B4X] TextEditor - Save and load external files

This is a B4i and B4A example, which demonstrates various external files related tasks.

1626784777442.png
1626784790557.png


The behavior is not exactly the same as the platforms capabilities and behavior...
 

Attachments

  • TextEditor.zip
    184.2 KB · Views: 2,340
Last edited:

[B4X] WebView + CKEditor (rich text editor)

1628407653890.png


This is a cross platform example that adds CKEditor rich text editor using WebView: https://ckeditor.com/ckeditor-5/
Make sure to read CKEditor licensing and pricing...
 
Last edited:

[B4X] B4XCache - simple and useful cache collection

B4XCache is a new collection added in B4XCollections v1.10.
It is key / value store collection, similar to Map.
When the cache reaches the set maximum size, the least recent used items are removed...
 
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...
 

Attachments

  • 1703145831287.png
    1703145831287.png
    313.3 KB · Views: 2,695
Last edited:

[B4X] Show image in IDE link - B4J created Program Starter

Good morning to all of you,

some times I find it easier to make notes on a paper with a pen. I am a visual person and I understand something better this way. At several times I move my notes to...
 

Attachments

  • ProgramStarter.zip
    969 bytes · Views: 103
Last edited:

EasyAR 3D Object Rendering

Hello everyone, it's been a while since I wrapped the EasyAR SDK Library which can be found here I haven't had much time but I decided to create a small example to learn how to render...
 

Attachments

  • OpenGL2_v1.8.zip
    37.7 KB · Views: 98
Last edited:

Google Maps

Attachments

  • GoogleMaps.zip
    19.4 KB · Views: 5,313
  • MapExample.zip
    14.4 KB · Views: 159
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
    15 KB · Views: 143
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,802

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

Last edited:

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

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: 266
Top