Tutorials & Examples

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

Control your Android device from your Windows PC

This is very clever software and when I first saw it, it blew my mind. It took a couple of seconds for me to comprehend what I was seeing.

The program is called ScrCpy and when run on your...
 

Getting List of Files of a webserver directory via httputils2 & php

When you like to download files with httputils2 you need to know the files by name. There are some examples using ftp or a generated xml file with the contents first. To me this could be easier...
 

[B4X] get fav icons from a website

Fan Menu

After all the work I went through to make the simple pie graph, I noticed I had 90% of the code to make a "Fan Menu" type library so I went ahead and created the following prototype...
 

Attachments

  • fan_menu.zip
    221 KB · Views: 900

? Retrieving 2 JSON data feeds from an online server (Wear OS watch face) - Newer developers

Hello All
Here we have a simple example of how you use corwin42s WatchFace Library. The WatchFace library is extremely simple to use, corwin42 has done a great job wrapping it, thank...
 

Attachments

  • JSON.zip
    13.1 KB · Views: 565
  • LEDCoronavirus_V1.0.0.1.zip
    111 KB · Views: 578
Last edited:

Updating an embedded DB

A common task we face while enhancing our apps is the need to update the structure of a running DB.
This is relatively easy if you know for sure that your users will all go from version 1 to...
 

Connect Android to MySQL Database Tutorial

A new more powerful framework is now available: jRDC2.

This tutorial explains the basic concepts required for creating a connection between Android device and a remote server. In this...
 

Attachments

  • MySQL.zip
    8 KB · Views: 17,435
Last edited:

Controlling Sonoff S20 smart power plugs [B4X] [Home Automation]

Android SMB / CIFS tutorial

[B4X] [B4XPages] Pleroma / Mastodon Client

Roughly speaking, Mastodon is an open source, distributed, social network a bit similar to Twitter:

Pleroma is a lightweight implementation of Mastodon with some...
 
Last edited:

OpenCV and Tensorflow methods for chessboard and chessfigures detection/classification

Two apps show methods and their usage to recognize chess figures and their position based on a camera shot, one using only OpenCV image processing and utils (Chessboard OCV) and the second one...
 

Attachments

  • Chessboard image processing.pdf
    229 KB · Views: 952

Integrating In App Purchase in B4A Platform

2640091000001671191.20201113055034.96000607556292075557033905422838:50511207092434:2800:72DA040886606D8CEE17E248BA...
 

[B4X] [B4XPages] Firebase Push Example

Attachments

  • Push.zip
    7.3 KB · Views: 1,966

Subnet Scanner

Here is a simple subnet scanner. It scans the current class C subnet for a particular port number and tries to open a connection.

It logs all the IPs that are found to have that port open in a...
 

Attachments

  • Scanner Example.zip
    4.2 KB · Views: 513
Last edited:

intent for beginner - messages between apps

Part 1

1- Intent is exactly a Specific Message between Android Apps.
Building this message is simple in B4A:
B4X:
dim intent1 as intent

2- Any message (ie: intent) has a specific purpose...
 

EasyDeviceInfo (with inline Java Code)

It incorporates this Github project via inline java code. The project reports a whole lot of information about your device and write the results to the B4A log:

B4X:
** Activity (main)...
 

Attachments

  • b4aEasyDeviceInfo.zip
    15.5 KB · Views: 1,056

[B4X] Like Animation - smooth and beautiful transition

This is a simple like animation.
It looks smoother and better in real.
ezgif.com-video-to-gif.gif

LikeAnimation:
Private Sub LikeAnimation(xlbl As B4XView,duration As Int)
    Dim txt_size As Float = xlbl.TextSize
    If...
 

Attachments

  • Like Animation.zip
    9.8 KB · Views: 524
Last edited:

Read / Write Excel files on Android

The Excel library is a new library that wraps the open source jexcel project and allows you to read or write Excel workbooks. This library supports XLS files. The new xml based format (xslx) is...
 

Attachments

  • ExcelExample.zip
    12.8 KB · Views: 9,810
  • ExcelLibrary.zip
    13.1 KB · Views: 9,109
Last edited:

[B4X] Library Templates

Seeing the new Template feature, I thought I'd use it for the new libraries I create.
I created a Template that opens three folders (B4J, B4A, B4I) with the library.

In addition to...
 

Attachments

  • NewLibrary.b4xtemplate
    15.3 KB · Views: 513
Last edited:

[B4X] B4XPages enhanced example

In case anyone is interested I attach a modified version of Erels' ThreePagesExample for B4A only. It demonstrates the following enhancements.

1) B4XMainPage requests a Runtime permission.

2)...
 

Attachments

  • B4XPagesTest-B4A.zip
    40.8 KB · Views: 1,535
Top