Tutorials & Examples

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

Setting up Firebase messaging in 5 minutes

Important for Huawei users (or others):

Make sure your energy settings don't pause your app (even the firebase service). Huawei calls it "protected apps". If your app isn't protected...
 

Attachments

  • 7.JPG
    15.6 KB · Views: 918
Last edited:

Simple Image viewer & pager

Hi all.

This example shows the images contained in a certain directory, with pinch zoom and smooth scroll -when image is zoomed- capabilities (provided by JSTouchImageView library, from...
 

Attachments

  • Simple_ImageViewer.zip
    7.9 KB · Views: 1,155

Help file for beginner programmers on Android platform.

I made for beginer detailed description of how to prepare a computer and phone to create mobile applications on the platform Android. I myself Russian therefore made the instruction in Russian and...
 

Creating a cross-platform "dialog" class with input validation

I'm currently developing an App that'll be released for Android and IOS. It presents "files" to the user, allows them to select a file and then presents the content for editing, and finally allows...
 

Attachments

  • ValiDialogs (0.02).zip
    15.7 KB · Views: 552
Last edited:

[B4X] FTP Server code update for multi-network card hosts

Update (2017/10/17): For code changes that make this a true B4X update, see post #4

This relates to the FTP Server code posted here...
 
Last edited:

Use a handheld Bluetooth scanner via SPP mode

Update: Code to reconnect added


I've bought a BT handheld scanner on Ebay for about 45€ like this:


It comes with a sheet with barcodes which can be scanned to do some...
 
Last edited:

Connect Android to MS SQL Server Tutorial

Attachments

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

Adapt your layouts using SetLayout

Attachments

  • upload_2015-9-1_1-32-15.png
    28.7 KB · Views: 665
  • upload_2015-9-1_1-43-32.png
    205.6 KB · Views: 603
  • upload_2015-9-1_1-44-8.png
    103.2 KB · Views: 618
  • lm SetLayouts Gen.zip
    15 KB · Views: 771
Last edited:

(old) Google Maps Android v2 tutorial

Attachments

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

Creating a sticky service - long running background tasks

Edit: Things have changed with newer versions of Android and new restrictions. Sticky services should not be used any more.

Background service example...
 
Last edited:

B4A -interpreter for Android / programming on the device

B4A-Interpreter

I've made a B4A interpreter that runs B4A-Code on Android
to write easy B4A-test programs on my Phone.
To make an app only copy the source code back to the...
 

Attachments

  • androidb4a.zip
    8 KB · Views: 898
  • androidb4a2_7.zip
    7.3 KB · Views: 902
  • B4AInterpreter0_3.zip
    354.4 KB · Views: 1,104
  • B4Ainterpreter0_4.zip
    355.2 KB · Views: 795
Last edited:

Scrollview: Adding labels and setting their height automatically depending on the text(size)

This is just a simple example (and yes, there are others doing similar). You can modify this example it by using other colors, gradients, adding other views and so on to have a simple but good...
 

Firebase Invites/ DynamicLink/ DeepLink [relationship between]

Firebase has several extremely useful free server-based features for developers of mobile apps.
The free "Spark Plan" is suitable for small business applications.​
...
 
Last edited:

Horizontal ScrollPage

Hi everybody!
I want to share this simple example of an HorizontalScrollView that works like ViewPager. Main difference between this and ViewPager is that HorizzontalScrollview has an only inner...
 

Attachments

  • HorizzontalScrollPage.zip
    7.1 KB · Views: 819

Android In-App Billing v3 Tutorial

Last edited:

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: 2,030
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...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…