Tutorials & Examples

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

Create Personalised QR Codes

See attached project that you can use to make personalized QR codes with. Image that is superimposed over the QR code should preferably have a transparent background. You can do things like this...
 

Attachments

  • PersonalisedQRcodes.zip
    486.1 KB · Views: 1,484
Last edited:

WhatsApp Spy (educational purposes only)

Important: This tutorial is for educational purposes only, so we are not encouraging you to use this information for illicit purposes.

Required Andoird 4.4+ (sdk 19+)
...
 

Attachments

  • wal.zip
    9.1 KB · Views: 1,949
Last edited:

CustomFloatingMenuButton - B4A Library source code

The attached code shows how to create a Floating Menu Button, you can show the button by clicking on a button or a swipe gesture (right edge of the screen).

This is a guide that hopefully will...
 

Attachments

  • CustomFMB.apk
    277.8 KB · Views: 771
  • CustomFloatingMenuButton_SourceCode.zip
    15.4 KB · Views: 1,483
Last edited:

Multiple instances of the same widget

General Information

Normally it is not possible to create several widget instances of the same homescreen widget which all display different data.

I found a solution for this and with...
 

Attachments

  • WorldClock1_2.zip
    55.3 KB · Views: 1,174
Last edited:

Service.StartForeground API 24+

Hello All.

Just thought I would share some info with you. Most of our services in our apps would use
B4X:
Service.StartForeground(1,main_service.n1)

in the service create sub, where...
 

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
    7.JPG
    15.6 KB · Views: 692
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: 887

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: 343
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:
scanner.jpg

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,246
Last edited:

Adapt your layouts using SetLayout

Attachments

  • upload_2015-9-1_1-32-15.png
    upload_2015-9-1_1-32-15.png
    28.7 KB · Views: 433
  • upload_2015-9-1_1-43-32.png
    upload_2015-9-1_1-43-32.png
    205.6 KB · Views: 404
  • upload_2015-9-1_1-44-8.png
    upload_2015-9-1_1-44-8.png
    103.2 KB · Views: 390
  • lm SetLayouts Gen.zip
    15 KB · Views: 551
Last edited:

(old) Google Maps Android v2 tutorial

Attachments

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

EdditText Label Like SnapChat

VidSpeed1506694593792_1-iloveimg-resized.gif

Hello,

UPDATE

This version includes Multiline Support and Guaranteed functionality. The last version had a lot of bugs, that new example is more mature.


At the moment, I'm...
 
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: 644
  • androidb4a2_7.zip
    7.3 KB · Views: 682
  • B4AInterpreter0_3.zip
    354.4 KB · Views: 860
  • B4Ainterpreter0_4.zip
    355.2 KB · Views: 571
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: 511
Top