Tutorials & Examples

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

[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: 220
  • B4XLibs.b4xtemplate
    10.2 KB · Views: 228
Last edited:

GPS / GNSS tutorial

Attachments

  • GPSExample.zip
    15 KB · Views: 333
Last edited:

[B4X] Supabase - Storage Files


This is a very simple tutorial on how to use the storage file options.

Upload File...
 

How to get access to ALL FILES AND FOLDERS on Android 11 to 14+ (DirRootExternal)

This is an example of how some apps like file managers, antivirus and other apps that depends on access to DirRootExternal to create folders, create files and read files from the Root of the...
 

Attachments

  • FilesRoot.zip
    69.3 KB · Views: 346

WebViewSharePDF

There are some examples on this forum for
1. saving Webview content as Bitmap,
2. creating PDF file using Printing library and
3. opening or sharing the PDF file to WhatsApp using...
 
Last edited:

[B4X] PocketBase - Deleting files


Please read the official documentation about deleting files in pocketbase...
 

[B4X] PocketBase - How to reach api via smartphone on the same network when hosted locally


If you develop with B4J with Pocketbase, then you simply enter the localhost address...
 

Make http request to Web API Server v3 (POST/PUT) with XML payload

Here is a modified example where the web api server excepts XML payload.
Required latest WebApiUtils v3.05 and MiniORMUtils.

Change the URL to server
B4X:
Private URL As String =...
 

Attachments

  • XmlClient.zip
    440.6 KB · Views: 212
  • xmlserver.zip
    422.4 KB · Views: 221
Last edited:

EdditText Label Like SnapChat

VidSpeed1506694593792_1-iloveimg-resized.gif

Hello,

UPDATE

This version includes Multiline Support and Guaranteed functionality. The last version had a lot of bugs, that new example is more mature.


At the moment, I'm...
 
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...
 

[B4X] PocketBase - Authentification


Please read the official documentation about auth in pocketbase...
 

[B4X] PocketBase - Storage


Please read the official documentation about storage in pocketbase...
 
Last edited:

SQL (SQLite) InstrRev

SQLite has the string function Instr, which finds the first occurrence of a specified string in another string.
There is no InstrRev function though to find the last occurrence of a string within...
 

[B4X] PocketBase - Database CRUD


This is a very simple tutorial on how to use the CRUD options. A more detailed...
 

Load HTML files from DirInternal to a WebView with UltimateWebView2 and WebViewAssetLoader

I would like to contribute to the never-ending question of how to load local HTML files into a WebView. The reason are the following recently asked questions (here and here by...
 

Attachments

  • UltimateWebView2ExampleFileAccess.zip
    27.5 KB · Views: 270

[B4X] AS Settings - Custom Property


With this property you can add your own view or layout

IMG_0540.jpg


In the following example, I add a B4XImageView to...
 

Attachments

  • AS Settings CustomProperty Example.zip
    351.1 KB · Views: 232

[B4X] AS AutoComplete - Custom Datasource and Icons


In this example I will show you how you can use your own data source and also display...
 

Attachments

  • AS_AutoComplete Manual mode Example.zip
    201.1 KB · Views: 278

[B4X] Firebase Push Notifications 2023+

Google has deprecated the previous method of sending push notifications. It will stop working on June 2024.
If you have an already working solution then you only need to update the B4J side. Do...
 

Attachments

  • B4J-SendingTool.zip
    1.8 KB · Views: 1,512
  • PushClients.zip
    16.8 KB · Views: 510
Last edited:

[B4XPages] Single page with no action bar and other pages with action bar

This is an example of how to make one of the pages show without the action bar while the others do show it.

Note that usage of IME in the main activity, to find the action bar height.

In each of...
 

Attachments

  • DynamicActionBar.zip
    16.3 KB · Views: 243

Camera2 - Still images and videos

Camera2 library is based on the Camera2 API introduced in Android 5 (API 21).
It is designed to work together with CamEx2 class.
It is supported by B4A v7.3+. The library will be included as...
 

Attachments

  • CamEx2.zip
    22.5 KB · Views: 472
Last edited:
Top