Tutorials & Examples

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

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:

Basic4Android for Linux (Ubuntu) - Installation Script

Hy everyone,

Here is a little script to install Basic4Android on Linux (realized and tested on Ubuntu 12.04 LTS 64bit )

To run this script:
1 - Edit B4A_Installer_en.sh with your favorite text...
 

Attachments

  • B4A_Installer_en.zip
    6.4 KB · Views: 1,003
Last edited:

Arduino ADK Introduction

Introduction

This is one of a series of tutorials about using the Arduino Mega ADK microcontroller with Android devices

There already exists a Basic4android library for the IOIO...
 
Last edited:

Max length of SMS message

My app will be sending SMS messages (using sms.send(phone, text) some of which may be longer than 160 chars. Currently, I have broken these down into multiple messages each of which is < 160...
 

Add shortcuts to your Android application

Attachments

  • Shortcut.zip
    9.5 KB · Views: 1,925
Last edited:

How to create a shortcut DIRECTLY from within your application

I know there are some threads on this topic, and I had the feeling that there might be some misunderstandings. So to save you the time to read through all those threads and get the solution at...
 

Introduction to customizing B4A / B4J with Autohotkey

From time to time there are feature requests and wishes that are too individual to be implemented in the IDE and can easily be done in Autohotkey. For those who do not already know this sometimes...
 

Attachments

  • B4A.zip
    2.6 KB · Views: 333
Last edited:

Android Drawables Demo

I wasn't sure were to put this, its simply a dev tool I built to view all the available drawables, as defined at http://androiddrawables.com/.

I built this small tool for myself, but...
 

Attachments

  • generate drawables code (Excel 97-2003).zip
    144.3 KB · Views: 335
  • AndroidDrawablesViewer_V2.zip
    36.8 KB · Views: 370
Last edited:

Android Views (controls) and dialogs

Many users who start to develop Android applications may be frustrated by the fact that they don't find the control they are looking for. Its even worse, for some mysterious reason there are no...
 

Hangman Tutorial (part 1)

Hi, I'm Eric. I am still fairly new to Basic4Android, but have dabbled off and on in programming for the last 20 years. I started programming with GWBasic back when I was about 11. It took me...
 
Last edited:

Logcat viewing

The Basic4Android IDE contains a mysterious tab entitled "Logcat" in the right hand pane.

This archive contains a help file that will tell you what a Logcat is and also contains a more...
 

Attachments

  • B4ALogViewer1.2.zip
    16.3 KB · Views: 878

TIP: Replace your Floats by Doubles

It may happen sometimes that, if your dealing with complex non-integer calculations, your code may not perform exactly the way you want to. I came across this problem when I was trying so create a...
 
Last edited:

AutoStarts - Complete App

What is it?
AutoStarts is an Android based software package for auto starting apps on your phone or tablet at bootup. It was mainly written to support the eHome product. It is fully...
 

Attachments

  • Screenshot.png
    Screenshot.png
    40.7 KB · Views: 1,081
  • AutoStarts.zip
    100.6 KB · Views: 1,161
Last edited:

Classes tutorial

Basic4android v2.00 adds support for classes modules.

Classes definition from Wikipedia:
In object-oriented programming, a class is a construct that is used to create instances of...
 

Attachments

  • Draw.zip
    7.1 KB · Views: 2,350
Last edited:

How to add highscore code

Hey fellow B4Aers, I was wondering if any one has a code snippet for storing highscores in a app. I have been searching and nothing. I just need that first shove and i can take off from there...
 

Change Icon and Assets Files based on the Build Configuration

This tutorial explains how the new conditional compilation feature can be used to change the app icon and the assets files based on the chosen build configuration.
See this tutorial for more...
 
Last edited:

In-App consumable purchases

Hi All, this is an little tutorial to implement "App-In consumable purchases"


B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These...
 

Where to get help on sending SMS or eMail

Where in the forum should I look for help on how to send a SMS message or a eMail from a smartphone. I am sure there must be documentation on how but I have not found it.
 

Running B4A on a Mac - my experience

I hope this is the right sub topic to post this under. Didn't think it fitted anywhere else.
(Erel, is there a place for a General sub topic??)

I have recently written a blog post on my...
 

Connecting your device to the IDE

Introduction

A program called adb.exe - Android Debug Bridge - is the key component that is used to communicate between programs on your desktop and the emulator or device. adb can be...
 
Last edited:
Top