Tutorials & Examples

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

[B4X] Features that Erel recommends to avoid

Many things have changed in B4X and also in the underlying platforms. I will try to list here all kinds of (old) features that have better alternatives.
B4X is backward compatible so these...
 
Last edited:

[B4X] Documentation Booklets

The B4X documentation booklets are available in PDF format, Download Link.
All files are included in the zip file in the link above, pdf booklets and all the source code.

You can also...
 
Last edited:

[B4X] "Code Smells" - common mistakes and other tips

"Code smells" are common patterns that can indicate that there is a problem in the code. A problem doesn't mean that the code doesn't work, it might be that it will be difficult to maintain it or...
 
Last edited:

💡 [B4X] [XUI] [B4XPages] Using B4A GPS to create a BASIC weather app - Newer developers

Hello All
Here we have an simple example on how you use your Android device GPS in conjunction with OpenWeather API, this is just a simple example and can obviously be changed and updated by...
 
Last edited:

💡 [B4X] [XUI] [B4XPages] Simple B4A stock ticker code using JSON REST API - Newer developers

Hello to you all,
Here is a simple example on retrieving data from a REST API requested using the JSON Generator (you could also use http URL download), the same JSON library is also used to parse...
 
Last edited:

💡 [B4X] [XUI] [B4XPages] B4A recreating Google Trends results with xCharts - Newer developers

Hello to you all,
Here is an extremely simple example on how to easily recreate Google Trends results using B4XPages with B4A and the xChart library. In this example I used Google...
 
Last edited:

💡 [B4X] [XUI] [B4XPages] B4A PreoptimizedCLV lazy loading from SQLite and CSV - Newer developers

Hello to you all,
Welcome to Sheldon Coopers and Amy Farrah Fowlers fun with flags ;)

Here is a simple example on using B4XPages with both an SQLite database and also a CSV file with multiple...
 
Last edited:

💡 [B4X] [XUI] [B4XPages] B4A 'Erel Says' hand, eye memory game - Newer developers

Hello to you all,
I decided to recreate this simple but effective game example, the game is based on the B4XPages library. The game is designed for hand, eye and memory coordination, so I called...
 
Last edited:

💡 [B4X] Using JSON generator, 5 simple examples - Newer developers

Hello all,
Well here we are with a simple example on how to use the JSON generator, this applies to B4A, B4J and also B4i.

I've created 5 different examples using B4XPages for new B4X developers...
 

Attachments

  • JSON Generator.zip
    14.9 KB · Views: 491
Last edited:

💡 Tic-Tac-Toe. Simple XUI cross platform WiFi game example B4A vs B4i vs B4J - Newer developers

Requires B4A V9.90 or higher.

Hello fellow B4X developers.
Here is my example of using a broadcast address to automatically find another devices IP address on a network, then to use that IP...
 
Last edited:

💡 Retrieving 2 JSON data feeds from an online server - Shared module with B4i

Hello All
I might be a bit late to the show with this one, but I've been busy completing paid work. Hopefully new members will find this useful.

The B4i example can be found here...
 

Attachments

  • JSON.zip
    12.3 KB · Views: 371
  • Android-CoronavirusCOVID-19_V1.0.0.1.zip
    62.2 KB · Views: 396
Last edited:

💡 Retrieving 2 JSON data feeds from an online server (Wear OS watch face) - Newer developers

Hello All
Here we have a simple example of how you use corwin42s WatchFace Library. The WatchFace library is extremely simple to use, corwin42 has done a great job wrapping it, thank...
 

Attachments

  • JSON.zip
    13.1 KB · Views: 463
  • LEDCoronavirus_V1.0.0.1.zip
    111 KB · Views: 471
Last edited:

💡 Part 2 Examples - Creating long lists using xCustomListView with Lazy Loading - Newer developers

Hello All,
If you're not experienced with using xCustomListView (xCLV) with Lazy Loading (LL) when it comes to loading long lists of data, then I strongly suggest that you read the following post...
 
Last edited:

💡 Part 1 Basics - Creating long lists using xCustomListView with Lazy Loading - Newer developers

Hello All
After thinking about it yesterday and having a quick chat with Erel, I decided that my previous long list examples were not basic enough for newer B4X developers, so I put together a...
 
Last edited:

💡 Match the flags. Simple XUI cross platform game tutorial for new B4X B4A developers - Newer developers

Hello B4X'ers,
This morning as my new clients are currently beta testing software that I developed for them using B4J 👍, I thought to myself lets create a quick and simple game using B4A for the...
 
Last edited:

💡 B4A Uninstalling a kiosk app

Hello all,
I've noticed 2 or 3 posts about not being able to uninstall a kiosk app because android:testOnly is missing from the manifest file, it's not in Erel's example.

If you just add the...
 
Last edited:

💡 A simple XUI app transfer from B4A to B4J in under 11 minutes

Hello all,
Here is a quick video to show how simple it can be to transfer your B4A projects to B4J when using XUI. It's been on my mind all days now, so I thought I would give it a go and also...
 

[XUI] CustomListView with floating titles

clv_floatingtitle.gif


Title items are added to the list.
A Panel is set above the list. The panel shows the current title when the top visible item...
 

Attachments

  • CLV_FloatingTitle.zip
    9.4 KB · Views: 1,010
Last edited:

[Wish] Code folding

It would be very handy if we could fold up our code on If Then statements.

Thanks...
 

[WebViewExtras] send data: from WebView to B4X / from B4X to WebView [addJavascriptInterface] [CallSub]

addJavascriptInterface [WebViewExtras] CallSub [B4XPages] Example

I created a Example (after search and not found)

send data: from WebView to B4X / from B4X to WebView ,
using addJavascriptInterface and...
 
Last edited:

[video] Common mistakes

A video demonstrating several common programming mistakes:


 
Last edited:

[UI] [B4A] Real State App UI Example + Source Code

Attachments

  • Real State App.zip
    264.7 KB · Views: 990

[UI] [B4A] Online Course App UI Example + Source Code

Attachments

  • Online Course.zip
    273.5 KB · Views: 1,298
Top