Tutorials & Examples

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

How to make a simple loading screen

Here is a simples exemple how to make a simple loading screen with a timer.
you can use to make a splash screnn too.

is based on webview
-html
-css

The html and gif is on files folder

This is...
 

Attachments

  • loading.zip
    378.6 KB · Views: 2,341
  • 1.png
    1.png
    3 KB · Views: 1,592
  • 2.png
    2.png
    5.7 KB · Views: 1,542
Last edited:

MySQL data to webview using PHP

Hi there

The purpose of this is to demo how one can add, update, read and display mysql database records into a webview.


1. Setting up development environment

For this...
 

Attachments

  • PhpLoginSourceCode.zip
    14.1 KB · Views: 1,458
Last edited:

GOOGLE MAPS ON WEBVIEW (No API key)

Edit by Erel: Don't use WebView for this. Unlike Google Maps SDK, it is not free, more difficult to implement and Google Maps SDK will work better...
 
Last edited by a moderator:

[B4X] [B4XPages] What exactly does it solve?

B4XPages makes many things simple and even trivial.
As Android developers, we are dealing with these challenges for many years now so it might take us a while to understand how simple things can...
 
Last edited:

[B4X] Creating a cross platform custom view packed as b4xlib

The attached b4xlib library is a cross platform list of colors:

firefox_86IZH8vlHm.png


It is a XUI custom view. The custom view is based on two...
 

Attachments

  • ColorsListProject.zip
    18.4 KB · Views: 895
  • B4J ColorsList Usage Example.zip
    1.9 KB · Views: 871
  • ColorsList.b4xlib
    9.4 KB · Views: 823

[B4X] [B4XPages] Network + AsyncStreams + B4XSerializator

java_USPawWZPiX.png


1592139571839.png


B4i_nUuTQqGuEH.png


Cross platform version, based on B4XPages, of...
 

Attachments

  • Network Example.zip
    220.7 KB · Views: 3,450
Last edited:

[B4X] CloudKVS - synchronized key / value store

CloudKVS solves a difficult and common problem. The user needs to work with online data, however as this is a mobile app we cannot assume that the device will always be connected to the remote...
 

Attachments

  • B4J_ServerKVS.zip
    2.8 KB · Views: 2,528
  • B4i_ClientKVS.zip
    8.7 KB · Views: 1,620
  • jBuilderUtils.zip
    2.3 KB · Views: 3,277
  • B4J_ClientKVS.zip
    6.4 KB · Views: 1,979
  • B4A_ClientKVS.zip
    11.6 KB · Views: 2,540
Last edited:

[B4X] Cross platform example

i_view64_27Givs3HpE.png


This is a simple example that demonstrates a recommended method of sharing code and files between B4A, B4i and B4J.
It is...
 

Attachments

  • Guess My Number.zip
    227.1 KB · Views: 1,126
Last edited:

IDE Color Schemes

Last edited:

[B4X] xCLV + PreoptimizedCLV + BCTextEngine

1590306481550.png


This example uses PreoptimizedCLV to create a list of BBCodeViews.
In most cases it will be simpler to create a single BBCodeView, as BBCodeView is scrollable. However there might be...
 

Attachments

  • BBCodeCLV-B4A.zip
    24.1 KB · Views: 1,033
  • BBCodeCLV-B4i.zip
    184.8 KB · Views: 783
  • BBCodeCLV-B4J.zip
    17 KB · Views: 791
Last edited:

[B4X] I need 100 <custom view here>s. How to add programmatically?

Custom views are designed to be added with the designer.

It is however very simple to create a layout file with the custom view and load it multiple times...
 

[B4X] How to get <custom view here> from <CLV or any other container>

This is a common question and for a good reason.

Custom views classes are not views by themselves.
The views tree only holds views.
This means that this code cannot work:
B4X:
Dim...
 
Last edited:

[B4X] Text, Strings and Parsers

This guide is relevant for B4A, B4i and B4J.

There are all kinds of tools and libraries available for the different text based formats. The purpose of this guide is to organize the available...
 
Last edited:

How to connect to SQL Server using jtds-1.3.1.jar

This subject keeps coming up so I thought I would do a tutorial and sample programs. One is B4A, the other is B4J. If you want code examples download the programs.

The B4J I created for testing...
 

Attachments

  • SQLTestB4A.zip
    8.6 KB · Views: 1,425
  • SQLTestB4J.zip
    3.3 KB · Views: 1,071
Last edited:

RTL Layout Support

1.Declare in your app manifest that your app supports RTL mirroring.
Specifically, add below code in your manifest.
B4X:
SetApplicationAttribute (android:supportsRtl, true)

2. Copy the code you...
 
Last edited:

Complete tutorial: B4A & Your own (local) php & MySql Server (Xampp) with b4a

Update:

Newer releases of XAMPP come with MariaDB except of MySQL. Basically the same but the php scripts have to be changed a little bit:

- mysql is changed to mysqli
- "$con"...
 

Attachments

  • Example_B4A_APP_Xampp.zip
    9.7 KB · Views: 4,667
  • persons.zip
    582 bytes · Views: 4,118
Last edited:

[B4X] Manage your own Let´s Encrypt Certificates (ACME Client)

While looking around on interesting projects to wrap i found a java console app (jar file) which is able to create and manage Certificates which can be used in your Server.
It manages Let´s...
 

B4A on Kindle Fire & Amazon App Store Tutorial

* * * B4A on the Kindle Fire Device * * *

This tutorial is being written to help notify/guide B4A users of known issues that have been found using B4A with the kindle fire device and some...
 
Last edited:

[B4X] Net library (FTP, SMTP, POP) with Wait For

Starting from v1.70 of Net, jNet and iNet libraries the asynchronous methods return a 'sender filter' object.
This object can be passed as the sender filter parameter in a Wait For call.
This...
 
Last edited:

Create an Android virtual machine or laptop

Hey everyone,

I just came across this video and I thought I should share it with you:

 
Top