Tutorials & Examples

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

Intents and receivers

With the new imodules that allow you to work better with the intent and receivers, it is necessary to develop some examples of how to use them (even before it could be done but not in...


  • device_filter.zip
    413 bytes · Views: 100
  • IntentUSB.zip
    10.6 KB · Views: 95
Last edited:

Geofence - Monitoring a region in the background

Geofencing is an Android feature that allows your app to be notified when the user enters or exits a monitored region.

The nice thing about this feature is that your app doesn't need to run for...


  • Geofence.zip
    15.6 KB · Views: 147
Last edited:

B4A Social Network Version 1.30

Audio Ringbuffer

if you want to build instant music in apps from single sounds, it is important that the samples are absolutely synchron and perfect in timing. So you should send one single stream to the system...
Last edited:

Very simple GPS Program

Hi guys,

how to use :

1. copy the starter into your project

    If Starter.GPS1.GPSEnabled = False Then
        ToastMessageShow("Please enable the GPS device.", True)...


  • GPSbyJCD.zip
    7.9 KB · Views: 188
Last edited:

FusedLocationProvider + Resolution Dialog

** This is the only option to enable location services from inside your app. **

Example was updated and is based on B4XPages.
Don't miss:

1. ShowResolutionDialog sub that is added to Main. It...


  • Project.zip
    14.6 KB · Views: 872
Last edited:

BLE nRF Connect pre-BLE2 problem solving

It is surprising how often the basics get missed, when embroiled in heat of battle of programmer vs hardware, operating system, complex apis and libraries, etc.

I have found that whenever my BLE2...
Last edited:

Connect B4A to Bluestacks 5

Step 1. Copy the adb file path

- Locate the adb file in the SDK folder.
- Copy the adb file path

Path example: C:\B4A\sdk\platform-tools

Step 2. Connect the B4A adb with the emulator IP

- Open...

[B4X] [B4XPages] GoogleMaps example


Example of showing a Google map, in a cross platform B4XPages project. The APIs of the three GoogleMaps libraries are quite different from one another, so we need to use platform...


  • Project.zip
    10 KB · Views: 1,735

New online AI Regex Generator!

Check this out!

sheetai.app which helps use ai in google sheets, just ask it and done!

Quick Demo:


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


  • B4A-Bridge-source.zip
    29.5 KB · Views: 340
Last edited:

Background location tracking


Simple example of a foreground service that keeps the process running in the background. The current location is shown in...


  • MyLocation.zip
    8.9 KB · Views: 738
Last edited:

Webview & File.DirAssets - Enough Already

a code module provided by member Ivica Golubovic allows you to continue using...


  • assets.zip
    82.9 KB · Views: 383
Last edited:

Capture volume keys events while app is in the background

Could some Java guru kindly convert the following codes into B4A code for me, if possible, please? I would greatly appreciate it!

I'm looking for a reliable solution as a background service...

B4A Book Now Covers Version 11.20


I am happy to announce that both the paperback and electronic versions of the B4A tutorial and reference book “B4A Rapid Android App Development using BASIC” by Wyken Seagrave have...

[B4X] AS WheelPicker PlusMinus Example


This is an example project to demonstrate what is possible with the beautiful ASWheel. From version 2.0 it is possible per function animated (also possible without animations)...


  • AS WheelPicker PlusMinus Example.zip
    180.2 KB · Views: 178
Last edited:

Word wrap paragraph text to specified maximum characters line length

We needed to do some word-wrapping re: this thread and figured I may as well post my tawdry effort in case anybody else is looking for ideas 🍻 or code to hang s**t on 🤣

It has some niceish...
Last edited:

Exploring the b4x UltimateWebView with SithasoDaisy, #TailwindCSS + #DaisyUI UI Toolkit


This seeks to document my experiences of the UltimateWebView and the newest Sithaso Holdings UI kit, named SithasoDaisy, a TailwindCSS UI kit built on top of BANano + B4x.

Well, this is my...

LatLong To Timezone

I was looking for a code to know the timezone information from Latitude and Longitude coordinates and I found the code here LatLongToTimezone but it is written in java so I used it in...


  • B4A_TimezoneMapper.zip
    434.5 KB · Views: 108

[B4X] [BitmapCreator] Cross platform Falling Sand game


The main challenge here is the performance. All particles are updated if needed and redrawn every cycle.

The Particles...


  • B4A_FallingSand.zip
    25.6 KB · Views: 625
  • B4i_FallingSand.zip
    177.6 KB · Views: 441
  • B4J_FallingSand.zip
    24.6 KB · Views: 499
  • GameUtils.bas
    6.5 KB · Views: 519
Last edited: