Tutorials & Examples

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

Sharing files from your app with File Provider

Attachments

  • FilePicker.zip
    31.6 KB · Views: 2,850
Last edited:

Reading NDEF data from NFC tags

Using the NFC library you can read NFC tags formatted in NDEF form (NFC Data Exchange Format).
You can read more information about the internal process here: NFC Basics | Android Developers...
 

AndroidX SDK

Android Support Library was implemented and maintained in the last 8 years by Google. It includes a wide range of features and it hides many of the differences between the various Android...
 
Last edited:

MQTT Chat with Auto Discovery

Attachments

  • MqttChatWithAutoDiscovery.zip
    11.7 KB · Views: 3,636
Last edited:

Background Services in Android 8+ - Observations !

[B4X] Resumable subs and the index pattern

The "index pattern" is a pattern that you can see in many examples and libraries where resumable subs are used. It is a simple solution to avoid race conditions and unexpected states.

The...
 
Last edited:

Download huge files with HttpUtils2

Attachments

  • LargeFileDownload.zip
    11.5 KB · Views: 3,155
Last edited:

Library compilation - Compile your project to a library

Starting from Basic4android v2.50 you can compile your project, or part of it to a regular library.

Why should I compile a library?
  • Break large projects into several smaller (more...
 

Upgrading a Google Maps app to targetSDK 28

I decided to become Google's darling. After a very old B4A app, that went perfect for many many years (API 8, targetSDK 14), was threatened to be thrown out of the app store, I decided to waste my...
 
Last edited:

POU Game example

Hi all.
Here is a simple pou game example (only one room).


This example use this another example, but now with images...
 

[B4X] SELECT - don't waste tags

[A simple suggestion, not addressed to "experts"]

I am almost certain that some members, having to identify which view triggered an event, use the tags.

For example:

You have a kind...
 
Last edited:

[B4X] xCLV - lazy loading with text input

The attached B4J example demonstrates how to implement lazy loading with editable items.



There are several interesting points...
 

Attachments

  • LazyLoadingWithTextInput.zip
    6 KB · Views: 1,089
Last edited:

Decimal Number to Greek Words - Olografos

With this example I show how a decimal number can be translated to Greek words.

For example: Log(DeployCurrencyToText(1234.04)) give the result χίλια διακόσια τριάντα τέσσερα ευρώ και τέσσερα...
 

recursive Directorystructures and what to do with this filelist

We start with a few DIMs for needed Variables
B4X:
sub Globals
    Dim ffiles,ffolders As List
    Dim root As String
End Sub
and a main sub from this tutorial
B4X:
Sub ReadDir(folder As String...
 
Last edited:

Admob Mediation With Facebook

Hello,

This is the first time I am preparing a tutorial for this great community so please excuse me for any mistakes or weak explanations. Methods of some of the implementation may not be %100...
 

Vibrating Service - Also with Java code inside B4A project

This is a simple project that makes use of the device's vibrator. You can do the following:
1. Switch the vibrator ON for a specified duration of time (in milliseconds)
2. Switch the vibrator...
 

Attachments

  • JHSVIBRATE.zip
    74.4 KB · Views: 1,035
Last edited:

[B4X] [Visual Designer] Spreading Controls

Question: How can I build a layout with X controls spread horizontally or vertically?

Answer: You can use the designer script for this. As the designer script engine (currently) doesn't support...
 

Attachments

  • 1.zip
    9.5 KB · Views: 1,002

Signature Capture Tutorial

Several developers were interested in adding support for signature capturing in their Android application.
The attached code module makes it easy to capture the signature and save it to a file...
 

Attachments

  • SignatureCapture.zip
    6.4 KB · Views: 4,399

Using a Git Repository (Version Control) for Beginners



What is Version Control?

Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back...
 
Last edited:

LockBox3 (Delphi) AES encryption exchange with B4A/B4J

Part 1: The key

This is just a write up of my findings regarding the exchange of encrypted data between B4A/B4J and LockBox3 (Delphi). This write up focuses just on LockBox3's implementation of...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…