Tutorials & Examples

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

FCM message workflow explained by Google

Solving "Font asset not found" from library

I developed a class (compiled in library) that makes use of Typeface.MATERIALICONS, but when I tried using it there was this error:

HTML:
java.lang.RuntimeException: Font asset not found...
 

[B4X] Sending emails with Gmail REST API

This solution is compatible with B4A, B4J and B4i.

Up until now there were two ways to send emails:

1. Using the default mobile app which required the user to actually send the message...
 

Attachments

  • Gmail.zip
    59.7 KB · Views: 3,299

Device Owner / TaskLock / Kiosk apps 2017

SS-2017-07-18_13.19.46.png


Starting from Android 5 (API 21) there is better support for kiosk applications.
Kiosk applications = applications that...
 

Attachments

  • Kiosk.zip
    8.6 KB · Views: 2,805

User registration using httputils2, php, MySql and mail

When you join a forum you have to define a username and type in your email address and a password. After that you receive an email to finish the registration. Today I want to show the process how...
 
Last edited:

Signature Capturing with jSignature and WebViewExtras

Hi everyone:

After several test, now I can use the jSignature javascript plugin I was using in my web, in my B4A app, in order to update my database from b4a the same way I'm doing in my web. I...
 

Attachments

  • jsignature b4a.png
    jsignature b4a.png
    210.9 KB · Views: 1,176
  • jsignaturesample.zip
    57 KB · Views: 834

GitLab: Syntax highlighting for B4X files

When using an online repository such as GitLab, you can add a file named ".gitattributes" with the following content:

B4X:
*.bas gitlab-language=vb
*.b4j gitlab-language=vb
*.b4a gitlab-language=vb...
 
Last edited:

A trick for a badly closed application from a KILL TASK

I found it hard to find a solution to a problem that I think someone else could have
if you leave a service running with:

B4X:
#StartCommandReturnValue: android.app.Service.START_STICKY
or
B4X:
...
 

Dialogs library 2017 - Custom dialogs and async methods

Dialogs v4 is an extension to @agraham original dialogs library. It requires B4A v7+.

SS-2017-06-01_16.00.52.png


The main changes are...
 

Attachments

  • DialogsExample.zip
    9.8 KB · Views: 4,708
Last edited:

Read Key/Token from the B4A Manifest

I was busy with a project and wanted to allow users to enter their own Key/Token via the B4A manifest file and then have access to the key/token via B4A code. I did a quick search and could not...
 

Attachments

  • b4aReadManifestKey.zip
    9.6 KB · Views: 628

Getting Started With a Homescreen Launcher

Hey guys!

This forum and Basic4Android has helped my career prospects greatly, so I thought I'd try and do something useful...

As some of you know, I've been working on an Android Launcher or...
 

Foreground Service with Notification Builder

The app I'm building will allow the user to configure a series of timed actions, then execute them in order using "play" controls looking much like a music player (play/pause, skip...
 

Attachments

  • LongRunningService.zip
    11.6 KB · Views: 1,006
Last edited:

MJPEG / CCTV Server

Attachments

  • MJPEG_CCTV.zip
    12.6 KB · Views: 3,581
Last edited:

How I manage multi language in my Android App

Hi everyone !

I would like to share my own way to manage multi languages for my Android App.
I'm sure there are more than one method to do it, I just want to share mine.

This functionnality is...
 

[B4x]Send Firebase-Message via php

UPDATE

Please ensure you use https:// to call the Google fcm api. "Out of the sudden" one of my apps didn't work anymore :rolleyes:

B4X:
$ch = curl_init();
        curl_setopt(...
 
Last edited:

Supporting multiple screens - tips and best practices

This is an old tutorial. I recommend to instead watch the visual designer video tutorial: https://www.b4x.com/etp.html

There are several features in B4A that help you target Android...
 
Last edited:

[B4X] BitmapCreator Performance

Attachments

  • B4i_BC_Performance.zip
    1.8 KB · Views: 698
  • B4A_BC_Performance.zip
    8.8 KB · Views: 789
  • B4J_BC_Performance.zip
    1.6 KB · Views: 637
Last edited:

Corso B4A Intermedio - Creazione di due App, un Timer per gli Scacchi e una Calcolatrice

1797502_4b7b_3.jpg

Ciao a tutti, ho creato un nuovo corso rivolto a chi già si muove un po con B4A e non è proprio alle prime armi. Il...
 
Last edited:

[TEST RESULT] a <> b vs. Not(a = b)

[UPDATED]

Lately I've fallen into the habit of using Not instead of <> for Boolean comparisons - eg: Not(a = b) instead of a <> b. I'm not sure why I started doing this - probably because I think it...
 
Last edited:

AES128/Rijndael cipher implementation animation

Hi everyone,

in the following link you can find an animation about how the AES128/Rijndael cipher is implemented. As you will see, it is a mix of shifting/mixing/substituting (simple or by matrix...
 
Last edited:
Top