Tutorials & Examples

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

SQL Fiddle

There is a very useful online tool called SQL Fiddle that allows you to build test tables, populate them with data & run queries on them. This is great if you are trying to figure out how...
 

Using a PlayStation 3 controller with your Android Device

Using a PlayStation 3 controller with your Android Device
This tutorial is an extension of the B4A Generic Gamepad Support thread.

As you can...
 
Last edited:

Using Procedure in rdc Server

Hello Every Who can not know to use procedure with rdc there are two ways To do that

the first one is use Call keyword like this
B4X:
sql.getcategoryproducts=Call Getprodbycat(?)

this way...
 

Adding Tripod Mode to your DJI Mobile app

Adding Tripod Mode to your DJI Mobile app



Tripod mode for DJI drones, limits the speed of your drone to around 2 mph. So you're less
likely to hit something, when your in confined spaces, or...
 
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,628
Last edited:

Upload image to server, PostMultipart and PHP

A small example like loading an image with PostMultipart and PHP, I have been useful, you can adapt it needs.

Code B4A
B4X:
Sub CargaImagen
    Dim j As HttpJob
    Dim img As String =...
 
Last edited:

[B4A] MsMariaDb with Resumable Subs

Hi all,

I was looking into 'de-spaghettifying' my code that uses @DonManfred 's MsMariaDb...
 

B4A 7 Book in Russian

B4A is now available in a book that covers version 7.01.

For purchase visit http://pennypress.co.uk/b4a-russian/

ANDROID – это полюбившаяся во всем мире операционная система для мобильных...
 

B4A_CartoonCamera : Real Time Image Processing using Renderscript Intrinsics

This demo app shows how to use RenderScript ScriptIntrinsics in real time image processing. As an example the camera preview is converted into a cartoon like image. The processed image can be...
 

Attachments

  • B4A_CartoonCamera.apk
    148.4 KB · Views: 920
Last edited:

LoadBitmap / LoadBitmapResize / LoadBitmapSample

This tutorial explains the differences between the three methods.

The bottom line is that the best option is to use LoadBitmapResize and set the container gravity, if possible, to Gravity.CENTER...
 

DoEvents deprecated and async dialogs (msgbox)

Starting from B4A v7.0 the following warning will appear for DoEvents calls:
DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed).

The purpose of...
 
Last edited:

Global variables in Starter service not initializing

In my new app, I am using the Starter service. I have a few variables I am trying to create, and consume them in my "main" form.
But when I start my app, I get an error message of an undeclared...
 

[Coordinates] Distance Features

I added a new feature to my apps yesterday, this feature show you as text how far you are from the other coordinate.

This looks so:

within 1 kilometer: very close
More than 1...
 

Get all views or values of a CustomListView item

I developed a simple example about how I think you should handle easily views and values of a CustomListView item.

3 things:

1) constants pointing to the views order in the item;
2) two custom...
 

Attachments

  • Handle CustomListView.zip
    98.3 KB · Views: 842
  • Handle CustomListView 2.zip
    98.6 KB · Views: 901
Last edited:

Meld: Nice tool for diffing files and directories

This isn't really a tutorial but rather a recommendation for a diff tool. Sometimes you need to compare files, or even directories, and doing it manually is just too painful and difficult. I've...
 
Last edited:

Firebase Messaging: Chat app without server

When you register to FCM your app will receive a FCM token. Another app can send a message to this token. Probem here: How do I know the token of another device/user? Usually you have a server...
 

Attachments

  • FCM_Show.zip
    33.5 KB · Views: 1,635

Update your app to take advantage of the larger aspect ratio on new Android flagship devices

To deliver more engaging viewing experiences to their users, many Android OEMs are experimenting with new, super widescreen smartphones. Samsung has just announced a new flagship device, the...
 
Last edited:

XML Parsing with the XmlSax library

Attachments

  • XmlSax.zip
    10 KB · Views: 6,522
Last edited:

[B4X] Tips for B4X developers

After making more than 58k posts in the forum, I decided that it is a good time to build a list of tips and common mistakes. 12 points, in no particular order:

  1. Separate code from...
 
Last edited:

ULV - combining drag/drop and swipe to delete with a hierarchical data structure

The attached example presents the user with a two-level hierarchical view of data and uses ULV to implement the following:
  • Showing the hierarchy using indentation of sub-items
  • Drag/Drop...
 

Attachments

  • ULV_Hierarchy_DragDrop_SwipeDelete.zip
    26.5 KB · Views: 622
Top