Tutorials & Examples

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

IDE Color Schemes

Last edited:

NFC - Reading and Writing

NFC v2.00 adds support for low level access to the NFC features. This allows reading and writing from NFC tags.

The NFC library provides three features:
- Reading Ndef tags based intent filters...
 

Attachments

  • Project.zip
    15.4 KB · Views: 711
Last edited:

Android Usb Host Tutorial - AdbTest

Android 3.1 and above devices support Usb host mode. With this feature you can connect to regular client usb devices. Some devices are automatically recognized by the OS and are simple to work...
 

Attachments

  • USBExample.zip
    7.2 KB · Views: 4,039

Android Device Unique ID - Alternative to PhoneId

This is an old tutorial. It will not work on new versions of Android. You should either generate a random value when the app starts for the first time or use the advertising id...
 
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...
 

Camera2 - Still images and videos

Camera2 library is based on the Camera2 API introduced in Android 5 (API 21).
It is designed to work together with CamEx2 class.
It is supported by B4A v7.3+. The library will be included as...
 

Attachments

  • CamEx2.zip
    22.4 KB · Views: 780
Last edited:

ScrollView example with a Panel higher than the screen

Attached you find an example with a ScrollView with a Panel higher than the screen.

The layouts are designed in the Designer, not in the code.

There are 2 layout files:
- Main with the...
 

Attachments

  • ScrollViewBigPanel1.jpg
    ScrollViewBigPanel1.jpg
    18.3 KB · Views: 22,850
  • ScrollViewBigPanel2.jpg
    ScrollViewBigPanel2.jpg
    28.6 KB · Views: 21,926
  • ScrollViewBigPanel.zip
    8.8 KB · Views: 1,129
Last edited:

[B4X] MQTT Chat Room

Attachments

  • Chat_B4J.zip
    3.8 KB · Views: 3,401
  • Chat_B4i.zip
    6.1 KB · Views: 2,130
  • Chat_B4A.zip
    11.3 KB · Views: 2,579
Last edited:

Voice Recognition Example

A large button is displayed. When the user presses on the button, the user is asked to say something.
The voice recognition engine converts the audio to text.

Then the text is converted back to...
 

Attachments

  • VoiceRecognition.zip
    5.6 KB · Views: 5,421

FREE Source Code's !

Hi all,

i have updated my webpage and decided to add a tutorial section.

My first tutorial is a simple calculator (+,-,*,/) there is a video tutorial incl. Source code on my site.

I will upload...
 

Attachments

  • t1calc.zip
    3.7 KB · Views: 3,144
Last edited:

Code Obfuscation

This tutorial is relevant for B4A and B4J.
During compilation B4A generates Java code which is then compiled with the Java compiler and converted to Dalvik (Android byte code format).
There...
 
Last edited:

[B4X] Smart String Literal

The "smart string" literal is a more powerful version of the standard string literal.
It has three advantages:
  1. Supports multi-line strings.
  2. No need to escape quotes.
  3. Supports string...
 
Last edited:

New Easy to Use DataBase Functions V1.0 with Samples

Attachments

  • ADR.DataBaseProgram_1.5.zip
    12.6 KB · Views: 1,738
  • ADR.DataBaseSample_1.6.zip
    9.3 KB · Views: 2,142
Last edited:

Basic4Android for Linux (Ubuntu) - Installation Script

Hy everyone,

Here is a little script to install Basic4Android on Linux (realized and tested on Ubuntu 12.04 LTS 64bit )

To run this script:
1 - Edit B4A_Installer_en.sh with your favorite text...
 

Attachments

  • B4A_Installer_en.zip
    6.4 KB · Views: 989
Last edited:

[B4X] [B4XPages] Pleroma / Mastodon Client

Roughly speaking, Mastodon is an open source, distributed, social network a bit similar to Twitter:

Pleroma is a lightweight implementation of Mastodon with some...
 
Last edited:

[B4X] Localizator - Localize your B4X applications

Localizator is a cross platform solution for strings localization.

The strings are defined in an Excel workbook.

SS-2016-07-07_17.00.16.png


They...
 

Attachments

  • B4J_LocalizatorExample.zip
    5.7 KB · Views: 1,374
  • ExcelWorkbook.zip
    7.1 KB · Views: 1,773
  • B4i_LocalizatorExample.zip
    6.1 KB · Views: 1,086
  • Localizator.bas
    4.4 KB · Views: 1,765
  • B4A_LocalizatorExample.zip
    11.6 KB · Views: 1,314
  • B4J_LocalizatorConverterSource.zip
    10 KB · Views: 552
Last edited:

Guess my number - Visual designer & Events

Uncaught Exceptions

By default, when there is an uncaught exception the program will show a message box with the error title and the user will be asked whether they want to continue or not.

There are several...
 

Attachments

  • SendEmailWithCrashLogs.zip
    7.8 KB · Views: 1,878
Last edited:

Modules Attributes

Basic4android v2.50 includes a new method for handling project and modules settings.

These settings are now set in the code itself. The menu items were removed...
 
Last edited:

Super-fast alternative to emulator -> x86 Android

Hi all

*EDIT3*

For a much easier to set up and faster Android emulation please now look at this thread:

GeanyMotion...
 
Last edited:
Top