Tutorials & Examples

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

[B4A] [B4XPages] OSM Maps / FusedLocationProviderClient GMS

May 4, 2024 - Start of tutorial post...

Based on:

The original project was based on the GPS object /...
 
Last edited:

Android 16KB Page Size Compatibility Checker

This script checks for all the necessary markers to be sure your APK/AAB/SO files are 16KB page size compatible.
It has been simplified to easy usage.


What Does This Check?​

Starting with...
 
Last edited:

Android Live Wallpaper tutorial

The user can set live wallpapers by long pressing on the home screen and choosing Wallpapers - Live Wallpapers.
Creating a live wallpaper is not too difficult.
A service is responsible for...
 

Attachments

  • WallpaperExample.zip
    18 KB · Views: 216
Last edited:

"Stick Header" CLV Demo

A demonstration of using a "Stick Header" (Floating Title)...

With Erel's help HERE, I was able to create my version of a "floating title", as Erel has coined it.

If you use ChatGPT...
 

Attachments

  • CLV_StickyHeader.zip
    9.2 KB · Views: 188
  • HomePosition.jpg
    HomePosition.jpg
    77.7 KB · Views: 390
  • ScrolledToMarch.jpg
    ScrolledToMarch.jpg
    77.5 KB · Views: 346
Last edited:

Less back and forth with your smartphone and PC

As mobile developers, we all have the frustrating experience of taking our eyes off our smartphone and staring at the PC screen, and vice versa. Microsoft "Phone Link" is a useful Windows app that...
 

Debugging your app on real phone without USB cable or B4A bridge

Using a USB Cable for debugging apps is faster and easier than using B4A bridge. But as you know, being always connected to the USB port will decrease the battery life. With this instruction, you...
 

[XUI] CustomListView with floating titles

clv_floatingtitle.gif


Title items are added to the list.
A Panel is set above the list. The panel shows the current title when the top visible item...
 

Attachments

  • CLV_FloatingTitle.zip
    9.4 KB · Views: 1,530
Last edited:

[B4X] RandomUser API - SMM + lazy loading list + DDD

1760519045466.png


Cross platform example of showing a list of users, retrieved from https://randomuser.me/

The API returns a list with the data of 150 random users. The list is parsed and added...
 

Attachments

  • RandomUser.zip
    187.7 KB · Views: 248

User Login Demo - how-to features

Hi y'all,
I've been working on a demonstration app that would show a bunch of how-to's.

Specifically, how to use an "admin" user and a regular user (non-admin) for login data admin (CRUD).
All...
 

Attachments

  • UserAdminDemo.zip
    30.1 KB · Views: 226
  • 1.jpg
    1.jpg
    179 KB · Views: 459
  • 3.jpg
    3.jpg
    264.9 KB · Views: 446
Last edited:

Share SQLite database between 2 devices

This is just a proof of concept to show that Device A behave like a server hosting a database and Device B connects to it accessing the "shared" database. It is a response to this question...
 

Attachments

  • ShareDB.zip
    17.6 KB · Views: 664
Last edited:

OSMDroid - MapView for B4A tutorial

Attachments

  • 01 - SimpleMap.zip
    5.8 KB · Views: 5,191
Last edited:

Lottie Example with 16kb support

This example is based on the Lotti Library by DonManfred found here. (It still works)

I tried it on 16kb android 15 emulator and...
 

Attachments

  • LottieEx16kb.zip
    13.8 KB · Views: 194
Last edited:

[B4X]How to Implement Lottie in B4XPages (AXrLottie B4A, iLotttie B4i and B4J)

This is B4XPages example for LOTTIE implementation on Android (B4A), iOS (B4I) and Desktop (B4J)

B4A Implementation

Uses AXrLottie. Download the library and dependencies...
 

Attachments

  • LottieB4XExample.zip
    102 KB · Views: 681
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: 315
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:

Expandable list based on CustomListView

Last edited:

[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,750
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:
Top