Tutorials & Examples

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

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: 241
  • xmlserver.zip
    422.4 KB · Views: 253
Last edited:

EdditText Label Like SnapChat


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

[B4X] AS Settings - Custom Property


With this property you can add your own view or layout



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

Attachments

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

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

[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,586
  • PushClients.zip
    16.8 KB · Views: 587
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: 279

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: 565
Last edited:

[B4X] Simple function to highlight searchword in texts in CSBuilder Format

This simple function highlights all occurrences of a search term in a given text and returns the result as a CSBuilder.
The output can then be used for labels or MsgBox text.

B4X:
 Sub...
 

Attachments

  • Highlight2CsBuilder.zip
    10.1 KB · Views: 249

CREATE, UPDATE, DELETE AND CONSULT REGISTERS ON GOOGLE SHEET FROM YOUR APPLICATIONS

Searching the internet I found a service that allows you to convert any google sheet into a json api, it has a free version that allows you to consult and add data, connecting to the api is quite...
 

کانال تلگرام اختصاصی رفع خطاهای زبان فارسی Exclusive Telegram Channel for Persian Language Error Correction

If @Erel permits me, I will introduce my Telegram channel for error correction and provide examples specifically for the Persian language.
I am gathering all sorts of errors and putting them...
 

[B4X] AS FeatureRequest - Approved and implemented requests


In this example I show how easy you can display 2 pages, with the features that are under development and...
 

Attachments

  • AS_FeatureRequest Supabase Approved and implemented requests Example.zip
    181.8 KB · Views: 288
Last edited: