Tutorials & Examples

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

Writing good documentation

When you finally finish your gee wiz killer app and want to write the documentation for it explaining how to use it, there are some things you need to consider.

First, find someone with no...
 

Arduino ADK Programming

Introduction

This tutorial deals with connecting the Arduino to your PC and ensuring that we can run programs on it. It includes a brief description of the programming language for the...
 
Last edited:

Parse HTML code

Here is my module to parse HTML code, tag by tag.
It's specific to my needs, but you can alter it to suit specific tags. If you need help, don't hesitate to ask.
As a warning, I probably didn't...
 
Last edited:

Full Android 4.x UI

Hi,

In the past creating a UI in B4A annoyed me a lot, not because of a bad designer but the lack of nice UI components. With the StdActionbar and some AH libraries it all got better and it...
 

Attachments

  • ui_actionwithtabs.png
    ui_actionwithtabs.png
    12.5 KB · Views: 1,334
  • ui_actionwithpager.png
    ui_actionwithpager.png
    12.4 KB · Views: 1,310
  • ui_actionbar.png
    ui_actionbar.png
    10.2 KB · Views: 1,192
  • ui_drawer.png
    ui_drawer.png
    19.3 KB · Views: 1,410
  • ui_main.png
    ui_main.png
    21.3 KB · Views: 1,201
Last edited:

Fancy Code

Just like the clothes you wear, the code you write will also reflect your personal style.
Let's get fancy, shall we? ;)
B4X:
'Ugly:
     Dim validation As Boolean
     Dim sum = 1 + 1 As Int...
 

LoadBitmapSample -- How Well It Works

I thought I'd provide an interesting look at how well LoadBitmapSample works.

My current Game App that I'm working on generates a Release APK of 10MBytes in size.
The App has the following...
 
Last edited:

Make your app compatible with Android 5.0 devices

This is an old thread. It is not relevant if you are using newer versions of B4A.

In order for your current applications to run properly on Android 5.0 devices you need to:

1. Compile your...
 
Last edited:

How to use ABPhysicsEngine and GameSprite View together

Hi

I would like to share with you this small example on how to use ABPhysicsEngine and GameSprite View together.

I would like to thanks the authors for those greate libraries...
 

Attachments

  • theProject.zip
    145.3 KB · Views: 783
Last edited:

Game Physics: Gravity

Game Physics: Gravity

In this tutorial I will explain and exemplify through a simple "runner" game how to apply physics to any B4X object.
May it be a Panel, a Label, an ImageView...
 

Attachments

  • Sunset Run.zip
    22.7 KB · Views: 1,424
Last edited:

Running your apk as an extension on Google Chrome

I have just found this out and its such a marvel to share. These are the steps for a MS-Windows install

Step 1
  1. Download the ARChon runtime from...
 

Attachments

  • extensions.png
    extensions.png
    51.4 KB · Views: 882

Rapid Debugger

Basic4android v3.0 includes a new debugger named rapid debugger.

SS-2013-10-01_09.57.39.png


The rapid debugger is a very sophisticated debugger with...
 
Last edited:

DialogView: A complete walk-through guide

Introduction

Since we discovered b4a I looked for a flexible and developer friendly dialog library with an extensive and versatile object model. Unfortunately I could not find...
 
Last edited:

A Binary Clock

BinaryClock.png
Noting other than the B4A core lib required...
 

Attachments

  • BinaryClock.zip
    13.8 KB · Views: 686
Last edited:

BetterSlidingPanels - Nice sliding panels with page indicator

Based on Erels SlidingPanels example I created another version which is a bit more "touch friendly".

My changes:

  • Move panels while touching the screen and moving your finger...
 

Attachments

  • BetterSlidingPanels.zip
    13.9 KB · Views: 4,682
  • screenshot-1319099154643.jpg
    screenshot-1319099154643.jpg
    4.9 KB · Views: 5,269

Torch plus Morse code from the Flash and the Vibrator

The attached project has a dual purpose:
1. Send Morse Codes with the camera flash
2. Serve as a Torch

The Morse Code functionality might be useful when you are lost in mid ocean and need to...
 

Attachments

  • JHSflashMorse.zip
    84.4 KB · Views: 1,331
  • morseCode1.zip
    2.8 KB · Views: 1,091

Showing Google turn by turn

Hi,

Below some sample code to show directly Turn by Turn navigation instead of map:

Sub ShowNavigation (Latitude As String,Longitude As String)
'google place, just show map
Dim...
 

.Net FileTransfer - Implement AsyncStreams Prefix mode

Attachments

  • FileTransfer-Desktop.zip
    81.2 KB · Views: 4,881

Android 5.0 Information and Resource Thread

Android 5.0 Lollipop is a pretty big update hence the major version number upgrade.
I wanted to make a thread to combine Android 5 SDK related resources since it is such a big update.
At the...
 
Last edited:

Another Analog Clock

analogClock.png


See the attached project. It uses a library that wraps a project that you can find here. There are files in the Objects/res/drawable and Objects/res/values folders that this...
 

Attachments

  • AnalogClockB4A.zip
    125.8 KB · Views: 1,183
Last edited:

Android 4.2+: ADB using USB & Developer Options

I recently ran into some issues after an update to my Galaxy S3 and after seeing a related post, I decided to write this quick tutorial. I didn't see information on this elsewhere in the forum...
 
Top