Tutorials & Examples

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

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,520
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: 239

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: 218
  • 1.jpg
    1.jpg
    179 KB · Views: 442
  • 3.jpg
    3.jpg
    264.9 KB · Views: 438
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: 656
Last edited:

OSMDroid - MapView for B4A tutorial

Attachments

  • 01 - SimpleMap.zip
    5.8 KB · Views: 5,185
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: 186
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: 674
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: 308
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,732
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:

[B4X] CreateB4XFont

This is an example in response to this post and extension of the example posted here.

B4X:
Private Sub Button1_Click
    #If B4i
    Label1.Font = CreateB4XFont("D3-Biscuitism-Bold"...
 

Attachments

  • CreateB4XFont.zip
    119 KB · Views: 204
Last edited:

[B4X] Localizator B4XPages

A B4X project example to use Localizator in B4XPages
The device locale is selected for B4XCombobox by default.
This is answer to this question...
 

Attachments

  • LocalizatorB4XPages.zip
    20.9 KB · Views: 194

Play Games Services - Example and Class

Last year, I commissioned Biswajit to write a library for the new Google Play Games Services library. To manage the complexity of the code, I wrote a class called...
 

Attachments

  • Play Game Services Example.zip
    29.1 KB · Views: 638

Tips or Tricks for using Android Emulator

I want to share a few tricks when using the Android Virtual Device or Emulator.

1. Increase font and icon size
Go to Settings (gear icons) from drawer/desktop/slide down menu and choose...
 

Attachments

  • 1703145831287.png
    1703145831287.png
    313.3 KB · Views: 2,883
Last edited:
Top