Tutorials & Examples

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

[B4X][IoT] - Monitor the home temperature with Adafruit IO

Adafruit IO is a cloud service built for IoT solutions. It provides two interfaces: MQTT and REST API. It is very simple to use it with B4X as demonstrated in this example.

It is more than...
 

Attachments

  • B4R_IO_Adafruit.zip
    1.1 KB · Views: 1,251
  • B4A_IO_Adafruit.zip
    8.1 KB · Views: 1,672
  • B4i_IO_Adafruit.zip
    3.6 KB · Views: 925
  • B4J_IO_Adafruit.zip
    2.4 KB · Views: 1,067
Last edited:

[B4X] Input dialogs with XUI Views



B4XDialog from XUI Views library can show simple dialogs, template based dialogs and custom dialogs.

The example...
 

Attachments

  • B4A Dialogs.zip
    10.5 KB · Views: 5,288
  • B4J Dialogs.zip
    3.7 KB · Views: 1,814
  • B4i Dialogs.zip
    62.4 KB · Views: 1,336
Last edited:

[B4X] B4XTable - Adding custom navigation buttons

Depends on B4XTable v1.01+



It is very simple to add your own navigation features.

Code:
B4X:
Sub btnNext_Click...
 

Attachments

  • B4XTable With Navigation Buttons.zip
    59.9 KB · Views: 1,273
Last edited:

Check Trial Period using Dropbox (new with admin tool)

Check Trial Period using Dropbox (first version, improved version in Post #2)

Hello,

I have tried to find a solution to solve the control of the trial period of an app using the...
 

Attachments

  • encryptpw.zip
    297.9 KB · Views: 495
  • jackson-core-2.7.4.jar
    247.1 KB · Views: 489
  • trialcheck.zip
    347.4 KB · Views: 458
Last edited:

Simple example B4XDrawer sliding drawer class with materialicons and fontawesome icons

Good afternoon, I contribute to the community with a small example of the class B4XDrawer with material icons and fontawesome icons.



Thanks to the whole...
 

Attachments

  • Simple_example_B4XDrawer.zip
    12.4 KB · Views: 1,049
Last edited:

Android InApp Purchase Tutorial + Source Code

Hi,

in this tutorial i will show you how to add an in app product to your android app.

There is an official tutorial by @Erel so you should also check that out...
 

Attachments

  • InApp.zip
    3.2 KB · Views: 920
Last edited:

Auto restart an Android Application after a Crash

Trial Period using FTP

Here is a method using FTP to create a trial period for your app. Since there is no local file with trial information, the user cannot defeat it by manipulating stored data. Also, FTP calls are...
 
Last edited:

[Advanced] Using a custom view written with Kotlin



Using Kotlin libraries is similar to using Java libraries. The only difference is that we need to add references to two...
 

Attachments

  • CameraVideoButton.zip
    8.3 KB · Views: 736
Last edited:

Setting custom font for whole application without any library

Hi everyone,

After a week I have finally figured it out how to add a custom font for the whole application without any library or extra code.

Here is the solution:
  1. Create a folder...
 
Last edited:

JRC2 - Home banking coordinates card (open)

Hello, excited to share my humble code, which can be used as a two-factor authentication or a secondary login. For this take as an example the use of the bank coordinates card, which allows you...
 

Attachments

  • b4aexample.zip
    13.8 KB · Views: 445
  • Server TEST.zip
    5.5 KB · Views: 418
  • card.jpg
    116 KB · Views: 478

Create PDF with b4a and php

Hallo,

from time to time someone is asking on how to create a pdf with b4a.
I dont know how to do that ONLY with b4a.

Today i spend a few hours to write a b4a-example and a php-script which...
 

Attachments

  • b4aexample_createpdf_1.1.zip
    12.7 KB · Views: 1,486
  • 20140530_082501_356253050101034.pdf
    25.3 KB · Views: 1,494
Last edited:

Native Ads Unified with MediaView

* This ads are still not available to all developers.

The code of the example are based in this code from @Erel (Thanks!)...
 

Attachments

  • nativeads_mediaview.zip
    8.4 KB · Views: 624

AdMob Mediation (with InMobi)

AdMob supports ads mediation. This means that the ad can come from different ad networks and not just from Google AdMob network.

It can improve the fill rate and the revenue earned.

...
 

[Tool] Enhance your layouts with the "Layout bounds" developer option

The creation of layouts is very easy with the B4A Designer.

With more complex forms, however, it can happen that the result looks a bit weird. Usually the heights or distances between the...
 

Android Daydream / DreamService tutorial

Android 4.2 includes a new powerful screen saver feature named Daydream.

A "dream" starts when the device is docked or charged and the screen timeouts. By default dreams are non-interactive...
 

Attachments

  • Daydream_Circles.zip
    6.7 KB · Views: 1,061
  • Daydream_Webview.zip
    6.9 KB · Views: 1,060
  • Daydream_library1.0.zip
    4.8 KB · Views: 1,048

fuel gauge

Thanks to the excellent work of Klaus and Rotating Needle exemple, I needed a gas gauge



B4X:
#Region  Project Attributes
    #ApplicationLabel: fuel gauge...
 

Attachments

  • fuel gauge.zip
    425.6 KB · Views: 771

[B4X] B4XTable - Editable table and export to CSV



This example shows how to modify the table data. When the user clicks on a cell we show an input dialog and let the user...
 

Attachments

  • B4XTable-Editable.zip
    52.1 KB · Views: 2,340
Last edited:

[B4X] Tip - Modified server response

While analyzing a Crashlytics crash report of a small app of mine I was surprised to see the following error:

Fatal Exception: java.lang.NumberFormatException
For input string...
 

B4XTable - Photos Album



In this example the table is used to show the camera roll photos.

Main steps:
1. Get permission to access the external...
 

Attachments

  • B4XTable-Album.zip
    10.7 KB · Views: 927
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…