Tutorials & Examples

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

[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] 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:

(old) Google Maps Android v2 tutorial

Attachments

  • GoogleMaps.zip
    17.8 KB · Views: 11,403
Last edited:

Connect Android to MySQL Database Tutorial

A new more powerful framework is now available: jRDC2.

This tutorial explains the basic concepts required for creating a connection between Android device and a remote server. In this...
 

Attachments

  • MySQL.zip
    8 KB · Views: 17,125
Last edited:

OSMDroid - MapView for B4A tutorial

Attachments

  • 01 - SimpleMap.zip
    5.8 KB · Views: 4,624
Last edited:

[B4X] B4A, B4i, B4J and B4r API documentation - B4X Object Browser

API documentation - B4a, B4i, B4J and B4R (i.e. B4X) Object Browser (which also includes Code Snippet Management)

Hi everyone,

As you may or may not be aware, I have embarked on a...
 

Attachments

  • upload_2014-12-11_22-32-46.png
    upload_2014-12-11_22-32-46.png
    106.1 KB · Views: 2,537
Last edited:

Remote Database Connector (RDC) - Connect to any remote DB

Last edited:

HttpUtils2 - Web services are now even simpler

Attachments

  • FlickrViewer.zip
    10.7 KB · Views: 8,977
  • HttpUtils2.zip
    8.5 KB · Views: 11,247
Last edited:

GPS tutorial

This example shows how to work with the GPS library.

upload_2016-6-23_9-56-49.png


The GPS object is declared in the Starter service. It is easier to put the GPS in a service and not in an Activity as the...
 

Attachments

  • GPS.zip
    8.1 KB · Views: 6,750
Last edited:

Android Bluetooth / BluetoothAdmin Tutorial

Better implementation based on B4XPages:
Tutorial was rewritten in April 2018.
We will create...
 

Attachments

  • Bluetooth.zip
    12.4 KB · Views: 6,661
Last edited:

Android FTP tutorial

Last edited:

Introduction to the libGDX library

Introduction to the libGDX library

What is libGDX ?

libGDX is a game engine. As we saw in the first tutorial, a game engine provides a framework to create...
 
Last edited:

B4A-Bridge a new way to connect to your device

There are several options to develop with B4A:
- Android emulator or a VM.
- Connect to a real device in USB debugging mode
- Connect to a real device with B4A-Bridge.

I recommend starting with...
 

Attachments

  • upload_2016-9-29_9-29-57.png
    upload_2016-9-29_9-29-57.png
    14.3 KB · Views: 6,043
Last edited:

BlueTooth Printing via SPP

I finally have reliable, stable printing to a blue tooth printer (Citizen CMP-10 and CMP-20) from my Samsung 5570L Galaxy Mini Android Device running v2.3.6

Attached is a skeleton project...
 

Attachments

  • BTPrint.zip
    8.7 KB · Views: 6,376
Last edited:

ListView tutorial

Don't use ListView.
Use xCustomListView - it is more powerful, easier to work with and cross platform.
 
Last edited:

Custom WebSocket Based Push Framework

The online example is currently disabled due to spam :(

Now that both B4A and B4J support WebSockets it is possible to implement a full push framework solution.
The solution is made of two...
 

Attachments

  • Push_Client.zip
    11.5 KB · Views: 4,347
  • WebSocketPush.apk
    143.7 KB · Views: 2,784
Last edited:

Android Live Wallpaper tutorial

Using the new LiveWallpaper library you can now create your own live wallpapers. The user can set live wallpapers by long pressing on the home screen and choosing Wallpapers - Live Wallpapers...
 

Attachments

  • LiveWallpaperBall.zip
    8.3 KB · Views: 2,225
  • LiveWallpaperImage.zip
    8 KB · Views: 2,432
Last edited:

B4Xgoodies_from_walt61 Online

Well,

As JamesGreaves requested,
"So do you not think it would be of value to have even something like @walt61 has created but online?"...
 
Last edited:

Connect Android to MS SQL Server Tutorial

Attachments

  • MsSQL.zip
    6.3 KB · Views: 3,226
Last edited:

Protect your Android application with the Licensing library

The licensing library allows you to use Android market licensing service to verify that the user is allowed to access your application.

Your applications sends a request to the local market...
 
Last edited:

Android home screen widgets tutorial - part I

Edit: widgets are handled with receivers now. See the attached example.

This tutorial will explain how to implement your own home screen widgets (also named App Widgets).

It is important...
 

Attachments

  • HomeWidgets.zip
    24.6 KB · Views: 532
Last edited:

DBUtils - Android databases are now simple!

Attachments

  • DBUtils.zip
    14.4 KB · Views: 5,463
Last edited:
Top