Tutorials & Examples

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

B4A_CartoonCamera : Real Time Image Processing using Renderscript Intrinsics

This demo app shows how to use RenderScript ScriptIntrinsics in real time image processing. As an example the camera preview is converted into a cartoon like image. The processed image can be...
 

Attachments

  • B4A_CartoonCamera.apk
    148.4 KB · Views: 881
Last edited:

LoadBitmap / LoadBitmapResize / LoadBitmapSample

This tutorial explains the differences between the three methods.

The bottom line is that the best option is to use LoadBitmapResize and set the container gravity, if possible, to Gravity.CENTER...
 

DoEvents deprecated and async dialogs (msgbox)

Starting from B4A v7.0 the following warning will appear for DoEvents calls:
DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed).

The purpose of...
 
Last edited:

Global variables in Starter service not initializing

In my new app, I am using the Starter service. I have a few variables I am trying to create, and consume them in my "main" form.
But when I start my app, I get an error message of an undeclared...
 

[Coordinates] Distance Features

I added a new feature to my apps yesterday, this feature show you as text how far you are from the other coordinate.

This looks so:

within 1 kilometer: very close
More than 1...
 

Get all views or values of a CustomListView item

I developed a simple example about how I think you should handle easily views and values of a CustomListView item.

3 things:

1) constants pointing to the views order in the item;
2) two custom...
 

Attachments

  • Handle CustomListView.zip
    98.3 KB · Views: 811
  • Handle CustomListView 2.zip
    98.6 KB · Views: 870
Last edited:

Meld: Nice tool for diffing files and directories

This isn't really a tutorial but rather a recommendation for a diff tool. Sometimes you need to compare files, or even directories, and doing it manually is just too painful and difficult. I've...
 
Last edited:

Firebase Messaging: Chat app without server

When you register to FCM your app will receive a FCM token. Another app can send a message to this token. Probem here: How do I know the token of another device/user? Usually you have a server...
 

Attachments

  • FCM_Show.zip
    33.5 KB · Views: 1,609

Update your app to take advantage of the larger aspect ratio on new Android flagship devices

To deliver more engaging viewing experiences to their users, many Android OEMs are experimenting with new, super widescreen smartphones. Samsung has just announced a new flagship device, the...
 
Last edited:

XML Parsing with the XmlSax library

Attachments

  • XmlSax.zip
    10 KB · Views: 6,451
Last edited:

[B4X] Tips for B4X developers

After making more than 58k posts in the forum, I decided that it is a good time to build a list of tips and common mistakes. 12 points, in no particular order:

  1. Separate code from...
 
Last edited:

ULV - combining drag/drop and swipe to delete with a hierarchical data structure

The attached example presents the user with a two-level hierarchical view of data and uses ULV to implement the following:
  • Showing the hierarchy using indentation of sub-items
  • Drag/Drop...
 

Attachments

  • ULV_Hierarchy_DragDrop_SwipeDelete.zip
    26.5 KB · Views: 595

RDC - Simple way to create your own back-end database

Remote Database Connector (RDC) is a middleware web server that allows you to easily connect your Android app to any type of remote database server.
Usually you will use it with a database...
 

OpenCVforB4A: basic image manipulation: OCVMats,OCVCore and OCVImgProc

(This is the first of a small series of code-based tutorials that I will post regarding OpenCV for B4A. I will try to focus mainly on how to use OpenCV in B4A, tips, best practices...
 

Attachments

  • imageManipulations.zip
    268.8 KB · Views: 1,556

How to send/receive Data SMS

Last edited:

The effect of pressing a button

While I'm new. I can not find a full and detailed example. How to make a beautiful effect for button when I click button. I like using a gradient fill please. I did not use in my work designer...
 
Last edited:

Manifest Editor

Basic4android v1.8 introduces a new tool named Manifest Editor.
Every Android application includes a file named AndroidManifest.xml.
This is an XML file that describes the application for the OS...
 
Last edited:

HttpUtils2 - Web services are now even simpler

Attachments

  • FlickrViewer.zip
    10.7 KB · Views: 9,388
  • HttpUtils2.zip
    8.5 KB · Views: 11,760
Last edited:

Wrapping a small and easy 3rd party library with java

Attachments

  • 1.Original.zip
    179.4 KB · Views: 1,075
  • 2.Find the main source folder.zip
    3.4 KB · Views: 988
  • 3. use Rgenerator.zip
    3.1 KB · Views: 1,004
  • 4.Cleanup.zip
    2.9 KB · Views: 936
  • 5.Start of a new Eclipse-project.zip
    13.4 KB · Views: 927
  • 6.Working in Eclipse.zip
    91.7 KB · Views: 976
  • 7.New Wrapper.zip
    20.1 KB · Views: 1,005
  • 9.Resulting Library.zip
    5.2 KB · Views: 925
  • 10.Example CircularButtonEx.zip
    12.1 KB · Views: 942

Tutorial - Online Scoreboard

I noticed this being asked a few times so I thought I'd share the version I've created.

This implementation requires that you have a server with PHP and MySQL. I am by no means a PHP or MySQL...
 
Last edited:
Top