Tutorials & Examples

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

Change DataSet in Amir_RecyclerView

During the basic training in Amir_RecyclerView (ARV), a small test project was created, which may help RV newcomers to familiarize themselves with RecyclerViews.

Topic: "React to...
 

Attachments

  • ARV_Testproject_SimpleRv.zip
    10.2 KB · Views: 451
Last edited:

ScrollView example with a Panel higher than the screen

Attached you find an example with a ScrollView with a Panel higher than the screen.

The layouts are designed in the Designer, not in the code.

There are 2 layout files:
- Main with the...
 

Attachments

  • ScrollViewBigPanel1.jpg
    ScrollViewBigPanel1.jpg
    18.3 KB · Views: 23,039
  • ScrollViewBigPanel2.jpg
    ScrollViewBigPanel2.jpg
    28.6 KB · Views: 22,109
  • ScrollViewBigPanel.zip
    8.8 KB · Views: 1,308
Last edited:

Starter Service - Consistent & Single Entry Point

One of the challenges that developers of any non-small Android app need to deal with, is the multiple possible entry points.

During development in almost all cases the application will start from...
 
Last edited:

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,050

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,534

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: 964
  • jsignaturesample.zip
    57 KB · Views: 663

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,297
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: 449

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: 882
Last edited:

MJPEG / CCTV Server

Attachments

  • MJPEG_CCTV.zip
    12.6 KB · Views: 3,230
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: 537
  • B4A_BC_Performance.zip
    8.8 KB · Views: 623
  • B4J_BC_Performance.zip
    1.6 KB · Views: 488
Last edited:
Top