Tutorials & Examples

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

How to use NoxPlayer with B4A

It's recomended to use a real device or the Android SDK included emulator.

But if you for some reason want to use NoxPlayer as emulator it is easy!

Alternative 1 - Connect B4A IDE directly to...
 
Last edited:

[B4X] B4XPages - Converting to B4XPages

I'm opening this thread to collect tricks and caveats I'm coming across while converting my projects to B4XPages

CallSub from Service
Looks like a service that is started at boot may...
 
Last edited:

[B4X] Erel Teaches Programming - video tutorials

ETP is a series of video tutorials about B4X. The purpose is to allow developers with any programming experience, including no experience, to learn how to program with B4X.

The videos are...
 
Last edited:

[B4X] Corona Cases - Cross platform Example

B4i_lHVZTb71N9.png


Data source: https://ourworldindata.org/coronavirus-source-data

Cross platform example based on B4XTable and xChart...
 
Last edited:

Encrypting information with RandomAccessFile library

RandomAccessFile v1.30 introduces two new methods named: WriteEncryptedObject and ReadEncryptedObject.
These methods are similar to WriteObject and ReadObject methods. The difference is that the...
 

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,261
  • 1.png
    1.png
    3 KB · Views: 1,468
  • 2.png
    2.png
    5.7 KB · Views: 1,425
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,389
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:

Analog24hClock - Post #12

It wraps a tiny bit of this - just enough to show the clock. Thought it looked quite nifty...Have done nothing special to it other than painting the hands and the face a bit...:) Lib...
 

Attachments

  • Analog24hClock.zip
    494.3 KB · Views: 1,010
  • src.zip
    262.6 KB · Views: 982
Last edited:

[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: 820
  • B4J ColorsList Usage Example.zip
    1.9 KB · Views: 799
  • ColorsList.b4xlib
    9.4 KB · Views: 726

[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,244
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,410
  • B4i_ClientKVS.zip
    8.7 KB · Views: 1,486
  • jBuilderUtils.zip
    2.3 KB · Views: 3,066
  • B4A_ClientKVS.zip
    11.6 KB · Views: 2,387
  • B4J_ClientKVS.zip
    6.4 KB · Views: 1,874
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,023
Last edited:

Simple Compass

Have done this just for the fun of it. Have wrapped this posting. The B4A code is short and sweet:

B4X:
#Region  Project Attributes
    #ApplicationLabel: Compass
    #VersionCode: 1...
 

Attachments

  • TheJavaCode.zip
    37.4 KB · Views: 1,153
  • b4aCompass.zip
    105.8 KB · Views: 1,465
  • CompassLibFiles.zip
    6.5 KB · Views: 1,479

[B4X] SwiftButton - Adding Click/LongClick event

The next code add the funcionality in b4x to capture the click & longClick using Touch, in case of b4j add the option to fire the longClick using the Right Mouse Click or the secondary mouse...
 

COVID-19 Info Example

Hi,

Had made an application in B4A (my first in B4A) to display COVID-19 statistics.
Lots of data is specific to India. You can change them to reflect data from your country.

Used quite a bit of...
 

Attachments

  • pkCovid.zip
    372.1 KB · Views: 696
Last edited:

IDE Color Schemes

Last edited:

[B4X] Create Thumbnail and save it

Usage:
SavePictureToFile(XUIImageToJPEGByteArray(CreateThumbnail(xui.LoadBitmapResize(File.DirAssets,"Snapchat-248558753.jpg",150dip,150dip,True)),150dip,150dip,50),File.DirRootExternal,"test.jpg")
...
 

[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: 939
  • BBCodeCLV-B4i.zip
    184.8 KB · Views: 682
  • BBCodeCLV-B4J.zip
    17 KB · Views: 700
Last edited:
Top