Tutorials & Examples

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

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: 414
  • 2.zip
    40.3 KB · Views: 421
Last edited:

Dual Screen using UDP

An example of sending data from device A and display on device B screen using UDP protocol.
This is one of the solutions to this thread.
The code is kept since Aug 2023 but I don't see any...
 

Attachments

  • UDPSocketPrimary.zip
    10.3 KB · Views: 238
  • UDPSocketSecondary.zip
    10.3 KB · Views: 249

[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: 213
Last edited:

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

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

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: 358
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: 348

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] 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: 597

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

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: 378
  • xmlserver.zip
    422.4 KB · Views: 396
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:

[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: 495
Top