Tutorials & Examples

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

Turn your camera flash light into a torch - also with Java code inside the B4A project

See attached project. I have created this simple torch (on / off) by making use of java code found on the web and compiling it with Simple Library Compiler. Library files inside the /files folder...
 

Attachments

  • JHSTORCH_v1.zip
    23.3 KB · Views: 1,603
  • JHSTORCH_v2.zip
    117.3 KB · Views: 2,138
Last edited:

[B4X] B4XPages + B4XDrawer

B4XDrawer v1.53 adds support for B4J. This is a good opportunity to create a B4XPages example using B4XDrawer.
It does require some configuration so pay attention.

1594908342696.png


The example is...
 

Attachments

  • 3 pages + drawer.zip
    191.7 KB · Views: 4,003
Last edited:

Example of adding and calling B4X menu items

Android Usb Host Tutorial - AdbTest

Android 3.1 and above devices support Usb host mode. With this feature you can connect to regular client usb devices. Some devices are automatically recognized by the OS and are simple to work...
 

Attachments

  • USBExample.zip
    7.2 KB · Views: 4,366

Custom transitions between activities (+10 effects)

Attachments

  • Screenshot_20210203-174943.png
    Screenshot_20210203-174943.png
    89.1 KB · Views: 489

[B4X] [XUI] ToastMessage Class Modifications

Attachments

  • clXToastMessage1.b4xlib
    4.1 KB · Views: 862

Hint: solving compiler error "Unknown member: initializenewinstance"

I ran into this one today and fortunately my penny dropped rather quickly, though I didn't find anything on the forum about this error; hence this post as it might be useful for others. I was...
 

CHART JS IN ANDROID

Hi i make this example how you can add Chart JS in your project.


I was use this example...
 

Attachments

  • CHARTJS.zip
    218.7 KB · Views: 596

[XUI] CustomListView with floating titles

clv_floatingtitle.gif


Title items are added to the list.
A Panel is set above the list. The panel shows the current title when the top visible item...
 

Attachments

  • CLV_FloatingTitle.zip
    9.4 KB · Views: 1,289
Last edited:

FitBit Authentification and use of the FitBit Web Api (http)

Fitbit_app_icon.png FitBit OAuth and HTTP SDK

You need to define an App in the FitBit Console at https://dev.fitbit.com/apps

Make sure to set your "OAuth 2.0 Application Type" to...
 

Attachments

  • FitBitEx.zip
    11 KB · Views: 579
Last edited:

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: 1,020

✅ 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: 691
  • LEDCoronavirus_V1.0.0.1.zip
    111 KB · Views: 683
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,769
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:
Top