Tutorials & Examples

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

Third party tool for screen recording

I'm mostly using B4A-Bridge to connect the IDE to the Android devices. The built-in video recording feature doesn't work with B4A-Bridge.

I found a good alternative...
 

Programmatically Setting AIRPLANE_MODE_ON and Off

ScrollView example

The ScrollView is a very useful container which allows you to show many other views on a small screen.
The ScrollView holds an inner panel view which actually contains the other views.
The user...
 

OCR OFFLINE - Tesseract

I'm working in a project that needs OCR offline. Made a small progress and decided to share here and get some feedback.
I've searched a little bit at this forum and google about it. Found options...
 

Attachments

  • tessTest.zip
    11.9 KB · Views: 1,636
Last edited:

DJI app java object to start video recording

This starts recording video with your dji app

B4X:
'put this in process globals

   Dim AircraftInstance As JavaObject
  

    Dim CameraInstance As JavaObject


'Put this in AfterAircraftConnected...
 

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,063
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: 677
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: 561
  • Handle CustomListView 2.zip
    98.6 KB · Views: 640
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:
Top