Tutorials & Examples

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

Notify Builder example

Hi everybody,
I have a minimal code example. I use this code to ask for GPS activation. I was not able to find a working example of NotifyBuilder so I wrote for myself
So here it is!

Mauro
 

Attachments

  • notifybuilder.zip
    11.6 KB · Views: 1,026

ScrollView example with multiselection and SQL

Here is another ScrollView example with:
- adding a row
- moving a selected row up and down
- mono-selection, clicking on one row selects it, clicking on another row unselects the previous one and...
 

Attachments

  • ScrollViewMultiselect.zip
    9.5 KB · Views: 4,431
  • ScrollViewMultiselect1.jpg
    48.4 KB · Views: 21,131
  • ScrollViewMultiselect2.jpg
    47.9 KB · Views: 20,555

Firebase Realtimedatabase get a chat or content preview (filtering)

Hello,

a another Tutorial in the category how to program a nice chat app.
This Tutorial builds on this.

The Realtimedatabase lib. supports filtering, with this feature you can filter your...
 
Last edited:

Firebase Realtimedatabase user is typing feature

Hello,

A nice feature is to display whether a user is typing or not.

Most apps have a bubble added or by WhatsApp is a simple "wrtiting.." on top.

This is the result of this...
 
Last edited:

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,810
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: 2,296
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,466
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
    15.6 KB · Views: 992
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,202

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

Adapt your layouts using SetLayout

Attachments

  • upload_2015-9-1_1-32-15.png
    28.7 KB · Views: 743
  • upload_2015-9-1_1-43-32.png
    205.6 KB · Views: 646
  • upload_2015-9-1_1-44-8.png
    103.2 KB · Views: 696
  • lm SetLayouts Gen.zip
    15 KB · Views: 822
Last edited:

(old) Google Maps Android v2 tutorial

Attachments

  • GoogleMaps.zip
    17.8 KB · Views: 11,932
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: 937
  • androidb4a2_7.zip
    7.3 KB · Views: 942
  • B4AInterpreter0_3.zip
    354.4 KB · Views: 1,148
  • B4Ainterpreter0_4.zip
    355.2 KB · Views: 826
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...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…