Tutorials & Examples

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

[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:

[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:

XML Parsing with the XmlSax library

Attachments

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

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...
 

MediaPlayer tutorial

Attachments

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

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:

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:

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

GUI SDK Manager for newer versions of Android tools

Attachments

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

TabStripViewPager - Better ViewPager

Attachments

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

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

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

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,627
Last edited:

TabHost tutorial

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,711
Last edited:

Android database encryption with SQLCipher library

Attachments

  • SQLCipher.zip
    37.2 KB · Views: 133
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,853
Last edited:

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 Charts Framework

The purpose of this framework is to allow you to easily add different types of charts to your projects.
The current version supports pie charts, line charts and bar charts.

The framework is...
 

Attachments

  • Charts.zip
    9.6 KB · Views: 7,661
Last edited:

android.jar / targetSdkVersion / minSdkVersion

There are several versioned components that affect the compilation process and the runtime behavior of our apps.
The purpose of this tutorial is to explain the differences between them and help...
 
Last edited:
Top