Tutorials & Examples

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

Designer Scripts Tutorial

Background

One of the most common issues that Android developers face is the need to adopt the user interface to devices with different screen sizes.
As described in the visual designer...
 
Last edited:

KeyValueStore class - Simple and efficient key/value data store

Attachments

  • KeyValueStore.zip
    10.7 KB · Views: 4,512
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,838
Last edited:

Android "Kiosk mode" tutorial

Attachments

  • Kiosk.zip
    6.7 KB · Views: 5,520
Last edited:

Android push notification (C2DM) framework and tutorial

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

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,235
  • HttpUtilsExample.zip
    7.8 KB · Views: 5,673
Last edited:

Material Design 4 - Modifyable and advanced Menu

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

With the ACToolBar(Light|Dark) object we can get access to the Menu object of the activity. This opens the possibility for modifyable...
 

Attachments

  • ToolBarMenuExample2_0.zip
    18.6 KB · Views: 4,002
Last edited:

[B4X] AsyncStreams Tutorial

New video tutorial:


AsyncStreams allows you to read data from an InputStream and write data to an OutputStream without blocking your program. The reading and writing are done...
 
Last edited:

ActionBar / Sliding Pages tutorial

Attachments

  • ActionBar.zip
    14.1 KB · Views: 7,260
Last edited:

Designer Scripts & AutoScale Tutorial

Attached you find a pdf tutorial about Designer Scripts & AutoScale.
It includes Erels Designer Scripts Tutorial and a new AutoScale Tutorial.
It's an extract of two chapters from the next...
 

Attachments

  • AutoScaleExample7.zip
    73.1 KB · Views: 10,257
Last edited:

MediaPlayer tutorial

Attachments

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

ScrollView example

The ScrollView is a very useful container which allows you to show many other views on a small screen.
The ScrollView holds an inner panel view which actually contains the other views.
The user...
 

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

Signing your application before uploading to Google Play

The result of compiling your application is an APK file. This is a package file that contains the compiled source code and the assets files.
The APK file must be signed before installation...
 

Library compilation - Compile your project to a library

Starting from Basic4android v2.50 you can compile your project, or part of it to a regular library.

Why should I compile a library?
  • Break large projects into several smaller (more...
 

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

GUI SDK Manager for newer versions of Android tools

Attachments

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

Pinch Zoom and Move View tutorial

[Class] Pinch Zoom and Move View

I had the need for my purposes to do the Pinch Zoom in contemporary Move to a View, now I put my code available to anyone who might be in need, just to get...
 

Attachments

  • Screenshot_2012-11-02-20-02-13 (ridotta).jpg
    Screenshot_2012-11-02-20-02-13 (ridotta).jpg
    28.8 KB · Views: 2,369
  • PinchZoomAndMove_1.45.zip
    115 KB · Views: 4,259
Last edited:

FileTransfer - Send and receive files with AsyncStreams

Last edited:
Top