Tutorials & Examples

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

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: 515
  • AndroidDrawablesViewer_V2.zip
    36.8 KB · Views: 555
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: 1,101

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,290
  • AutoStarts.zip
    100.6 KB · Views: 1,400
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,743
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,616
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,215
  • screen.png
    screen.png
    32.9 KB · Views: 1,757
  • 2015-04-07 23_30_37-slide.png
    2015-04-07 23_30_37-slide.png
    163.5 KB · Views: 1,620
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: 2,047
  • screenshot-1330509212682.jpg
    screenshot-1330509212682.jpg
    12.5 KB · Views: 2,383
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
    screenshot.png
    25 KB · Views: 3,605
  • AddBorder.zip
    8.8 KB · Views: 1,761
Last edited:
Top