Tutorials & Examples

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

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,470
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:

Android home screen widgets tutorial - part II

Please start with the first part of this tutorial if you haven't read it before.
In this part we will build a "quote of the day" widget...
 

Attachments

  • Quotes.zip
    12.3 KB · Views: 3,391
Last edited:

Android Process and activities life cycle

New video tutorial:



Lets start simple:
Each B4A program runs in its own process.
A process has one main thread which is also named the UI thread which lives as long as the...
 
Last edited:

Auto starting your app

Hi all!

Here is what you need to auto start your app at boot up.
Create a service module and paste in the code below:


B4X:
#Region  Service Attributes
    #StartAtBoot: True
#End Region

Sub...
 
Last edited:

Simple switch button with image view

Hi
The application I'm writing I need switches, but not being an expert I arranged with some simple line of code. The result is good and does its work.
I used an image view and an int variable...
 

Attachments

  • SwitchButton.zip
    110.8 KB · Views: 1,095
  • screen.png
    32.9 KB · Views: 1,571
  • 2015-04-07 23_30_37-slide.png
    163.5 KB · Views: 1,444
Last edited:

Create online UI flow

Hi
I found a site that create ui(contain many views) and relate with together
I cannot explain complete please visit it
fluidui.com
 

Using standard Android search dialog with Basic4Android

Search is a core feature of Android. You can use a configurable standard search dialog for performing searches in your app. This search dialog can also be used within a Basic4Android App (with...
 

Attachments

  • SearchExample.zip
    8.1 KB · Views: 1,880
  • screenshot-1330509212682.jpg
    12.5 KB · Views: 2,215
Last edited:

Add border to Views and change Checkbox graphic

Here are a couple of routines that may come in handy.

The first adds a background to a view which can have a fill color, rounded corners and a border color. This is useful for picking out views...
 

Attachments

  • screenshot.png
    25 KB · Views: 3,419
  • AddBorder.zip
    8.8 KB · Views: 1,590
Last edited:

Very simple push service with a txt file

With this service, you can make some push notification with a .txt file.
 

Attachments

  • verysimplepush.zip
    10.1 KB · Views: 532

Simple ComboBox concept: WORKS!

hey guys... since we cant enter text but only select in spinner...
i have a small simple concept that can make it like our old VB combo box

its got to do with... aligning an edittext and a...
 

Attachments

  • MyComboBox.zip
    7 KB · Views: 998

Debugging android applications

Tutorial covering the new "Rapid Debugger" deployment mode is available here:
Rapid Debugger


This tutorial explains the debugging features added in Basic4android v1.50 as well as the...
 
Last edited:

Create your layouts based on percentages

Attachments

  • lm PercLayout.zip
    16.6 KB · Views: 544
Last edited:

Android based Closed Circuit TV (CCTV) example

Attachments

  • CCTVServer.zip
    30.1 KB · Views: 4,404
  • CameraCCTVClient.zip
    10.3 KB · Views: 4,254
Last edited:

game scailing (ui game objects ... etc)

So Erel pointed out to me about my question about ui and scailing. He said to use percentages. So I did some research. I looked up how to do it in html5 and verious other languages. So I was...
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…