Tutorials & Examples

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

Style guide for Android interface design

Subnet Scanner

Here is a simple subnet scanner. It scans the current class C subnet for a particular port number and tries to open a connection.

It logs all the IPs that are found to have that port open in a...
 

Attachments

  • Scanner Example.zip
    4.2 KB · Views: 449
Last edited:

Sudoku generator and solver

The attached project will generate and solve Sudoku puzzles (9x9). The code to solve the puzzles with was adapted from here (converted to B4A). The code to generate Sudoku puzzles with comes...
 

Attachments

  • src.zip
    4.1 KB · Views: 916
  • JHS_Sudoku.zip
    167.3 KB · Views: 933

Super-fast alternative to emulator -> x86 Android

Hi all

*EDIT3*

For a much easier to set up and faster Android emulation please now look at this thread:

GeanyMotion...
 
Last edited:

Supporting multiple screens - tips and best practices

This is an old tutorial. I recommend to instead watch the visual designer video tutorial: https://www.b4x.com/etp.html

There are several features in B4A that help you target Android...
 
Last edited:

SVN (source control) and Basic4android

Large projects and especially projects maintained by a group of developers usually require a source control system.
Using SVN with Basic4android is quite straightforward with a client tool such as...
 

Syncing local databases using PHP to access a database on a hosted server

My need was to sync calendars in which user 'A' changes the calendar and sends the change to other users by writing records to the hosted database.
The other users query periodically to see it...
 

Attachments

  • TestPhp.txt
    4.1 KB · Views: 416
  • TestPHP.zip
    12.8 KB · Views: 90
Last edited:

Tabela Fipe Api (Brasil Cars, Trucks and Motorcycles prices)

Hi all.
I found this example in some old folders on my pc and decided to share here.
it is a simple example of how consume a api with http.

Fipe is a organization with control of cars...
 

Attachments

  • consultafipe.zip
    262.8 KB · Views: 384

TabHost tutorial

Last edited:

TabStripViewPager - Better ViewPager

Attachments

  • TabStripExample.zip
    10.9 KB · Views: 3,442
  • TabStripViewPager_Library.zip
    30.5 KB · Views: 2,636
Last edited:

Take a Screenshot with Inline Java Code

I have tested this on an Android 7.0 device only - take a screenshot of your activity. You need to enable the JavaObject library to make use of it.

@JordiCP solved my initial problem here...
 

Attachments

  • b4aTakeScreenshot.zip
    16.3 KB · Views: 925

Take pictures with the internal camera

It is recommend to use the new CameraEx class. It provides more functionality.
The new Camera library allows you to take pictures using the back facing camera.

The following steps are...
 

Attachments

  • CameraExample.zip
    5.7 KB · Views: 10,142

targetSdkVersion 28 (Android 9.0)

Starting from August 2019 for new apps and November 2019 for updates, Google Play requires apps to set targetSdkVersion to 28.

The tutorial was updated with information related to API level 28...
 

TessBaseAPI ocr

hello, a small library of TessBaseAPI "tesseract4android-2.1.0" Ocr, you need to download tesseract4android-2.1.0.aar and junit-4.4.jar as Depends, for the tessdata languages...
 

Attachments

  • tess4.1.zip
    24 KB · Views: 443

Test Card Always Approves - Item unavailable in your country

Google never seizes to surprise us and its latest miracle is the following:

TestCardsNotAvailable.jpg


In order to fix this no matter if you have an EmailList set with the testers I have done two things. I do...
 
Last edited:

Test web back ends in your computer without fiddler and see what your app will post

 

Testing your app on real devices: pCloudy.com

Hi there

I'm hoping there are other methods of doing this..., if so, let's please share.

Anyway, a client was indicating the app I just sent does not work on their S7 samsung phone. So me, #bang...
 

Attachments

  • pCloudy.png
    pCloudy.png
    97.8 KB · Views: 593
  • googlecrash.png
    googlecrash.png
    18.2 KB · Views: 487
Last edited:

TestMyApp - Fast way to test your apps via ftp

Hello!

I'm new here, new to android and new to programming, and this is my first attempt at creating an app which uh.. lets my test my apps!

It's divided in two parts, one that puts the...
 

Attachments

  • TestMyApp.zip
    4.7 KB · Views: 442
Last edited:

Text files

Many applications require access to a persistent storage. The two most common storage types are files and databases.
We will cover text files in this tutorial.

The predefined Files object has...
 

TextPaginator Problem

I am using the PageTurnView library & like it very much.

In my code I would like to destroy & create a TextPaginator object or at least clear the text buffer that was set within this object...
 
Top