Tutorials & Examples

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

Material Design 1 - Basics

Note: You should use B4A 6.0 or above for this tutorial.

Android 5.0 (also called "Lollipop") introduced a new design for apps called "Material Design".

With this tutorial series I will...
 

Attachments

  • SimpleMaterialExample2_0.zip
    8 KB · Views: 2,326
Last edited:

App to sync photos using FileObserver library

I will thanks to warwound for FileObserver Library.
Also Thanks to all who share knowledge.

This App receive event when a new file (photo) is created al DCIM folder.
Also You can take photos...
 

Attachments

  • JSC_SyncSample.zip
    339.6 KB · Views: 673

Dropbox SDK V2 - Uploading big files to Dropbox

This Tutorial will show you all needed Code to do Uploads to Dropbox.

Requirement for this tutorial: you need to have your App Dropbox-ready (see Tutorial I - Authentification).

Asuming...
 
Last edited:

[B4X][OOP] Generic Sorter

The Sorter class uses quick sort algorithm to sort a list of objects.

There are exactly three assumptions about the list items:
1. All the items in the list are of the same type (or each item can...
 

Attachments

  • Sorter.zip
    8.2 KB · Views: 788

SQL tutorial here

Alternative to B4A Bridge: USB Cable Connection

Step 1: On your mobile device, make sure you have USB Debugging activated.
- Go to "Settings".
- Scroll down to the bottom and tap "About phone" or "About tablet",
- Scroll down to the...
 
Last edited:

Discovering iBeacon devices with BLE2 library




This example uses the BLE2 library to continuously scan for BLE devices, looking for iBeacons.
It never connects to any device. It parses the advertising data and calculates...
 

Attachments

  • iBeacons.zip
    11.4 KB · Views: 2,207
Last edited:

Perfect Crop + TouchImageView

Hi all i made a simple crop example, later many try and try its here
if this help someone

Im using the @warwound lib TouchImageView
many thx to @warwound

this sample have one...
 

Attachments

  • Crop Sample.zip
    496.3 KB · Views: 2,510
  • 10511109_807459332617618_2723995257439844685_n.jpg
    41.9 KB · Views: 1,387
  • 10514572_807459602617591_7148849783199956125_n.jpg
    47.5 KB · Views: 1,800
  • 10527643_807459462617605_5852512570621737594_n.jpg
    57.2 KB · Views: 1,235
Last edited:

Custom WebSocket Based Push Framework

The online example is currently disabled due to spam

Now that both B4A and B4J support WebSockets it is possible to implement a full push framework solution.
The solution is made of two...
 

Attachments

  • Push_Client.zip
    11.5 KB · Views: 4,811
  • WebSocketPush.apk
    143.7 KB · Views: 3,153
Last edited:

DBUtils - Android databases are now simple!

Attachments

  • DBUtils.zip
    14.4 KB · Views: 6,020
Last edited:

Automatic adjustment of system date and time through GPS (root only)

Attachments

  • GPS DateTime.zip
    10.4 KB · Views: 660
  • Android 6.png
    40.7 KB · Views: 726
  • Android 2.3.6.png
    13.9 KB · Views: 747

Simple Code Module to implemente a License file using StringFunctions Encrypt

B4X:
Type=StaticCode
Version=6.48
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
'******************************************************************************************************
'*...
 

Attachments

  • Licensing.bas
    3.5 KB · Views: 496

Colourful Indicator

It comes from here. The project displays as an example a colourful battery level indicator. Lib files are in the /files folder of the B4A project. The indicator will only update/redraw when...
 

Attachments

  • FitChart.zip
    42.2 KB · Views: 727
Last edited:

SQL tutorial

Update 2018:

New video tutorial:


The source code is available here...
 

Attachments

  • SQL.zip
    8.1 KB · Views: 12,462
Last edited:

[Example] Creating a sticky service - long running background tasks

Please see the original post:

About sticky service - long running background tasks...
 

Attachments

  • Services_example.zip
    9 KB · Views: 803
  • Screenshot_2016-11-25-12-23-53.png
    18.9 KB · Views: 842
  • Screenshot_2016-11-25-12-35-40.png
    77.4 KB · Views: 869
  • Screenshot_2016-11-25-12-37-41.png
    46.7 KB · Views: 800
Last edited:

Creating and Packaging a Wear App

This tutorial will show you how to create an app for a Wearable device and how to package it so it auto installs.

What is Android Wear?
For those that do not know, Google has released...
 

Attachments

  • WearTest(handheld).zip
    109.1 KB · Views: 1,047
  • WearTest(wearable).zip
    5.5 KB · Views: 1,006
Last edited:

Android Beam Tutorial

Android Beam is a feature introduced in Android 4 that allows one device to transfer a message to another device by placing the devices back to back. The communication is based on NFC.

The main...
 

Attachments

  • Beam.zip
    8.2 KB · Views: 1,187
Last edited:

How to make games

How to make games

A great idea, but a disappointing result

You woke up one morning with a great idea for a game. You rushed to your phone to convince your best friend to...
 
Last edited:

Shared Code Modules

Last edited:

Auto send KeyCodes.KEYCODE_BACK at runtime

Hi,
How to send / trigger the KeyCodes.KEYCODE_BACK at runtime without user clicking it

tks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…