Tutorials & Examples

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

Catch Webview Item's Longclick without late Javascript injection

Sample project to intercept clicks and longclicks on images or text portions in a webview.

The test project was created, because it became necessary to find a suitable solution from the very much...
 

Attachments

  • WebViewLongClick_03.zip
    242.2 KB · Views: 685

MapsDecodePolyline

Hello!

As already told in another thread, i'm working on a navigation app using Google Maps API in combination with Google Directions http-requests for routing.

The http-Requests looks as...
 

targetSdkVersion 28 (Android 9.0)

Starting from August 2019 for new apps and November 2019 for updates, Google Play requires apps to set targetSdkVersion to 28.

The tutorial was updated with information related to API level 28...
 

[Example] Add OCR features to your Android application

This example demonstrates how you can use an OCR web service to recognize text in camera images.

The program allows you to take a picture and then send it to OCRWebService.

OCRWebService...
 
Last edited:

[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,478
  • B4J_IO_Adafruit.zip
    2.4 KB · Views: 1,289
  • B4i_IO_Adafruit.zip
    3.6 KB · Views: 1,137
  • B4A_IO_Adafruit.zip
    8.1 KB · Views: 1,924
Last edited:

[B4X] Input dialogs with XUI Views

SS-2019-01-06_17.52.32.png


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,898
  • B4i Dialogs.zip
    62.4 KB · Views: 1,644
  • B4J Dialogs.zip
    3.7 KB · Views: 2,142
Last edited:

[B4X] B4XTable - Adding custom navigation buttons

Depends on B4XTable v1.01+

SS-2019-02-06_15.24.42.png


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,525
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: 694
  • jackson-core-2.7.4.jar
    247.1 KB · Views: 665
  • trialcheck.zip
    347.4 KB · Views: 648
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.

xIkVytQ.png


Thanks to the whole...
 

Attachments

  • Simple_example_B4XDrawer.zip
    12.4 KB · Views: 1,267
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: 1,123
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

SS-2019-03-25_12.35.54.png


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: 950
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: 637
  • Server TEST.zip
    5.5 KB · Views: 582
  • card.jpg
    card.jpg
    116 KB · Views: 724

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,737
  • 20140530_082501_356253050101034.pdf
    25.3 KB · Views: 1,738
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: 845

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.

upload_2016-9-26_16-13-44.png
...
 

[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,277
  • Daydream_Webview.zip
    6.9 KB · Views: 1,263
  • Daydream_library1.0.zip
    4.8 KB · Views: 1,289
Top