Tutorials & Examples

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

Git Version ID's: Getting Tags, Commits and Hash Info

To have the Git Version Info embedded in your B4A application it is necessary to do several steps.

1. Copy a batch file (gitv.bat) to a location in the path you are using.
2. Get and install the...
 

Attachments

  • GitVersionInfoForB4A.zip
    5.6 KB · Views: 304
  • asllc-gitversionnumberforb4a-447b30a1af20.zip
    12.5 KB · Views: 273
Last edited:

Guess my number - Visual designer & Events

FTP Example using a "Download-Queue"

It began in the english Forum.

In the english part of the forum i wrote an ftp example for @schimanski a few days ago which uses a "FTP Download Queue". all files are put into a list...
 

Attachments

  • ftpqueue.zip
    9.4 KB · Views: 1,239
Last edited:

How to read xml web service and store results into sqlite database

The attached example shows how to read any xml structure and store the results into a SQLite database table using a service

The example uses dbutils and a webview to show the results very...
 

Attachments

  • RssReader.png
    RssReader.png
    147.6 KB · Views: 1,071
  • savexToDb.zip
    13.6 KB · Views: 1,112

Two functions on arrays

Pending confirmation by Erel, I post three functions about arrays and maps that may be useful.

The first is to verify that an object variable is an array:
B4X:
Public Sub IsArray(Var As Object) As...
 
Last edited:

Displaying Math Formulas in pretty form

Hi,
I want to share with you one method to display math equations and formulas with a very good result without internet connection.I'm using it in one of my apps(in developing) and works fine with...
 

Attachments

  • SC20140211-014859.png
    SC20140211-014859.png
    30.3 KB · Views: 1,592
  • PrettyMathFormulas.zip
    327.5 KB · Views: 1,638
Last edited:

Getting picture from gallery

How do I browse and select a picture from the gallery?

:sign0163:
 

[SAMPLE CODE] Print from your Android app

This sample will show you how to print from your smartphone or tablet using Google Cloud Print (login required).

Requirements:

1 - Google GMail account.

2 - The web browser you...
 

Attachments

  • CloudPrintingCode.zip
    57 KB · Views: 2,178
Last edited:

The result of swiping an app from the recent apps list

One of the new features of Android 4 is the more powerful recent apps list. The user can remove tasks or applications from the list with a swipe gesture.

The result of this action is not fully...
 
Last edited:

Database Design - Introduction

This tutorial describes the steps I took to design the database for the Pre-Algebra Tester app available on Google Play.

This is Part 1 of a potential series that will describe how I...
 

Attachments

  • test_type_A.PNG
    test_type_A.PNG
    4.3 KB · Views: 370
  • test_type_B.PNG
    test_type_B.PNG
    1.3 KB · Views: 358
  • test_A.PNG
    test_A.PNG
    10 KB · Views: 340
  • test_B.PNG
    test_B.PNG
    4.9 KB · Views: 355
  • test_question_A.PNG
    test_question_A.PNG
    5.7 KB · Views: 329
  • test_question_B.PNG
    test_question_B.PNG
    11.6 KB · Views: 323
  • question_A.PNG
    question_A.PNG
    4.1 KB · Views: 367
  • question_B.PNG
    question_B.PNG
    13.1 KB · Views: 328
  • test_result_A.PNG
    test_result_A.PNG
    5.9 KB · Views: 317
  • test_result_B.PNG
    test_result_B.PNG
    2.1 KB · Views: 303
Last edited:

Example of an app with a phone and tablet layouts

This example demonstrates how you can create an app that looks and behaves differently depending whether it runs on a phone or a tablet.

The app layout is simple.
The main screen includes three...
 

Attachments

  • PhoneTabletLayout.zip
    13.1 KB · Views: 3,528

Wrapping for functionality

This post is aimed at those who may be new to programming concepts as well as b4a.

There are a lot of posts on the forum about wrapping java libraries for use with B4a, but that's not the only...
 

Attachments

  • MsgBoxWrapper.zip
    10.9 KB · Views: 402
Last edited:

Duck Typing and Command Design Pattern Example

I hope I have got this example right. Any positive criticism or improvements will be welcome!
I have made this to try learn and understand how this all works. This could also help others to...
 

Attachments

  • DuckTypingCommandPattern.zip
    10.2 KB · Views: 413

OUYA-specific tweaks

Your apps will run on OUYA just fine, normally.

It has no sensors. This includes microphone (so no voice recognition), gyroscope, compass, accelerometers, orientation, light. It has nada. It...
 

My first class module - Settings menu panel - Feedback please

2014-01-29_20-17-39.png 2014-01-29_20-17-33.png Hi,

For an app i'm working on I've created this settings menu class. Currently it is used to set a global value called language in the main activity. Of course you...
 

Attachments

  • settings_menu.zip
    8.5 KB · Views: 493
Last edited:

GameView - Create 2D Android games - Part I

Attachments

  • GameViewSmiley.zip
    9.4 KB · Views: 5,156
Last edited:

Short tip for working with voice commands

Forward Word

So, while I'm building my first app, suddenly I came over this example from Erel. Great for my app but, as you may know, even though 75% of the worlds...
 

Attachments

  • muchWow.txt
    326.9 KB · Views: 468

Moving Things

I'm just playing but play along with me, here's a very simple B4a project which you can load up.

Please change it and post your version here.

I like to move it move it.

ian
 

Attachments

  • MoveThings.zip
    7.8 KB · Views: 523

Hangman Tutorial (part 3)

Alright, here is part 3 of the Hangman Tutorial.

In part 2, we added the ability to import our words from an external text file by using File.ReadList to generate a List (which we stored in...
 

Hangman Tutorial (part 2)

Attachments

  • words.txt
    5.4 KB · Views: 442
Top