Tutorials & Examples

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

Intent Filters - Intercepting SMS messages in the background

Old tutorial. Don't use services. Use receivers.
Broadcast receivers are program components that can handle broadcasted messages. These messages usually notify about a system event.

There...
 
Last edited:

Android SlidingPanels - Simple way to create sliding layouts

This is an old tutorial. There are now simpler and better ways to achieve this effect.

For example...
 

Attachments

  • SlidingPanels.zip
    6.9 KB · Views: 9,851
Last edited:

Android database encryption with SQLCipher library

Attachments

  • SQLCipher.zip
    37.2 KB · Views: 128
Last edited:

StateManager - Helps managing Android applications settings and state

Edit: StateManager was written in 2011. I don't recommend using it for new projects. Use B4XPages + KVS2 instead.

StateManager is a code module which takes care of handling the application...
 

Attachments

  • StateManager.zip
    11.7 KB · Views: 1,708
Last edited:

TabHost tutorial

Last edited:

Orientation and accelerometer

The attached program displays the values of the different sensors:

sensors.png


It creates a PhoneSensors object for each type of sensor.
As you can...
 

Attachments

  • SensorsExample.zip
    7.5 KB · Views: 1,625
Last edited:

Walkie Talkie - Audio streaming over Wifi or Bluetooth

This example implements a simple "walkie talkie".

270px-Wikipedia_images_011.jpg

(src: wikipedia)...
 

Attachments

  • Walkie-Talkie.zip
    10.7 KB · Views: 10,986

Android Usb Host Tutorial - AdbTest

Android 3.1 and above devices support Usb host mode. With this feature you can connect to regular client usb devices. Some devices are automatically recognized by the OS and are simple to work...
 

Attachments

  • USBExample.zip
    7.2 KB · Views: 4,067

TabStripViewPager - Better ViewPager

Attachments

  • TabStripExample.zip
    10.9 KB · Views: 3,456
  • TabStripViewPager_Library.zip
    30.5 KB · Views: 2,648
Last edited:

GUI SDK Manager for newer versions of Android tools

Attachments

  • B4A-SdkManager-Source.zip
    63.3 KB · Views: 5,085
Last edited:

Android Sip / Voip tutorial

With the new Sip library you can make audio calls using Voip (Voice over IP) services.
Sip features were added in Android 2.3 (API level 9). Note that not all devices above Android 2.3 support Sip...
 

Attachments

  • Sip.zip
    6.9 KB · Views: 11,103

HttpUtils - Android web services are now simple!

OkHttpUtils2 is now available. OkHttpUtils2 is an improved version and is recommended for new projects. You shouldn't use HttpUtils (v1)!

HttpUtils is made of a code module and a...
 

Attachments

  • FlickrViewer.zip
    9.8 KB · Views: 3,248
  • HttpUtilsExample.zip
    7.8 KB · Views: 5,684
Last edited:

Converting VB6 to B4A

Below is a table listing features of Visual Basic 6 and their equivalents in B4A.

If you find errors or wish to add other features, post a reply here to have your input integrated into the table...
 
Last edited:

MediaPlayer tutorial

Attachments

  • MediaPlayer.zip
    9.5 KB · Views: 6,820

Variables & Objects in Basic4android

Types

Basic4android type system is derived directly from Java type system.
There are two types of variables: primitives and non-primitives types.
Primitives include the numeric types: Byte...
 

XML Parsing with the XmlSax library

Attachments

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

[B4X] DateUtils - Simplifies Date and Time Calcuations

DateUtils is a code module with a set of useful date and time related methods.
It complements DateTime api, it doesn't replace it.

The methods included in DateUtils:

B4X:
'Calculates the period...
 
Last edited:

[B4X] OkHttpUtils2 with Wait For


Downloading resources is simpler with the new Resumable Subs feature.

Using Wait For we can wait for the JobDone event in the same sub that started the download.
No...
 
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:

FileTransfer - Send and receive files with AsyncStreams

Last edited:
Top