Tutorials & Examples

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

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,159
  • 1.png
    1.png
    3 KB · Views: 1,382
  • 2.png
    2.png
    5.7 KB · Views: 1,341
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,270
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: 921
  • src.zip
    262.6 KB · Views: 875
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: 705
  • B4J ColorsList Usage Example.zip
    1.9 KB · Views: 681
  • ColorsList.b4xlib
    9.4 KB · Views: 594

[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: 2,824
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,234
  • B4i_ClientKVS.zip
    8.7 KB · Views: 1,339
  • jBuilderUtils.zip
    2.3 KB · Views: 2,769
  • B4J_ClientKVS.zip
    6.4 KB · Views: 1,720
  • B4A_ClientKVS.zip
    11.6 KB · Views: 2,222
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: 798
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,010
  • b4aCompass.zip
    105.8 KB · Views: 1,337
  • CompassLibFiles.zip
    6.5 KB · Views: 1,364

[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: 613
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: 801
  • BBCodeCLV-B4i.zip
    184.8 KB · Views: 550
  • BBCodeCLV-B4J.zip
    17 KB · Views: 575
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:

RippleView

The attached project comes from here (I have conducted some open heart surgery on it). It is working perfectly on my 7" tablet but on my Samsung S4 mini, unlike what is the case on my...
 

Attachments

  • b4aRippleView.zip
    38.2 KB · Views: 1,059
  • JavaCode.zip
    145.6 KB · Views: 935
Last edited:
Top