Tutorials & Examples

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

[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: 896
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: 932
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: 802

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,220

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

Google Maps with FusedLocationProvider

Google Maps uses the GPS as its location provider. It will not show the current location if GPS is disabled.
It is possible to switch to a custom location provider.

For example, here is me...
 

Attachments

  • GoogleMapsWithFusedLocationProvider.zip
    10.4 KB · Views: 1,391

Google Maps

Attachments

  • GoogleMapsExample.zip
    8.4 KB · Views: 4,594
  • GoogleMaps.zip
    19.4 KB · Views: 4,950
Last edited:

WhatsApp Layout Example (Tabstrip + CLV)

Hi all.
I found this example in some old folders on my pc and decided to share here.
it is a simple layout example, the app is whatsapp

This example use a clv and tabstrip

...
 
Last edited:

Happy birthday to you (Beep example)

Hi all.
this example play Happy birthday to you music with beep. (Audio librarie)

B4X:
Sub Globals
    Private lNotas As List
    Private lbNotas As Label
    Private tocando As Boolean
End Sub...
 

Attachments

  • parabens.zip
    217.9 KB · Views: 654
Last edited:

Ventilator Example (it's really windy)

Hi all.
I found this example in some old folders on my pc and decided to share here.
it is a simple example of how notcreate a ventilator in B4A.

On this example have, image...
 
Last edited:

Simple views colision (RPG Game)

Hi all.
I made a simple collision example, where our player (black square) can collide with any other view that has the tag = 1

This example is in Portuguese obviously because I am Brazilian, I...
 

Attachments

  • colisao.zip
    49.7 KB · Views: 508
Last edited:

OpenCV real time car detection examples, by @moster67 (and friends)

This is a full working example of real time ObjectDetection (in this case, cars) using cascadeClassifiers, getting the input from a recorded video file, making use of Videocapture. The example was...
 
Last edited:

AMD Ryzen processor & Android emulator AVD

If you have modern processor from AMD (Ryzen) - x86-variants of AVD cannot work by default.
Android emulator now requires the processors with a virtualization only.

By default Intel processors...
 
Last edited:

Check the Network State and Wifi SSID Name with reflection

============= MANIFEST =====================

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"...
 

RC4 encryption to transfer data between Android and PC

Hi,

On one of my projects, I had to transfer sensitive data from Android to PC but - with RC4 encription.
I wrote a little code that I want to share with you...
Maybe Android supports RC4...
 

Attachments

  • rc4.zip
    47 KB · Views: 624
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…