Tutorials & Examples

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

[UI] [B4A] Camping App UI Example + Source Code

Hello Community!
This is the first UI Example by XTools Group and more examples are on the way :)
In this example we've used CustomListView & XUI Views Librarys and implement a self-made Bottom...
 

Attachments

  • Camping App.zip
    365.1 KB · Views: 1,137

[TUTORIAL] Post to Facebook Wall via B4A app.

The attached project shows how to use the device's camera to snap a picture and upload it to your Facebook wall.

This sample is based on the code written by the one and only vb1992 found...
 

Attachments

  • FacebookCamSample.zip
    9.8 KB · Views: 2,302

[TUTORIAL] Inter-app Communication with Intents

DISCLAIMER:
This tutorial is written without testing code. There may be bugs, but try to understand the process, not copy the code.


An intent is a way for different applications...
 

[Tool] Enhance your layouts with the "Layout bounds" developer option

The creation of layouts is very easy with the B4A Designer.

With more complex forms, however, it can happen that the result looks a bit weird. Usually the heights or distances between the...
 

[Tip] Reset the manifest editor code to the default code

Use case: you downloaded an old example and you want to reset the manifest editor code so it will have the correct targetSdkVersion and theme.

Open the manifest editor, delete all text and save...
 

[TEST RESULT] a <> b vs. Not(a = b)

[UPDATED]

Lately I've fallen into the habit of using Not instead of <> for Boolean comparisons - eg: Not(a = b) instead of a <> b. I'm not sure why I started doing this - probably because I think it...
 
Last edited:

[SMM] Top sites example

This example uses SimpleMediaManager to show a list of 400 top sites, based on Alexa dataset.

1633602625321.png


Each item is made of two panels and a label:
- Panel for the favicon.
- Panel for the...
 

Attachments

  • Project.zip
    231.5 KB · Views: 427
Last edited:

[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,180
Last edited:

[Root] Using ADB over WIFI : B4A Bridge alternative

Hello all ,

Main advantage for this method over B4a Bridge is that it fixed issue I faced after updating my Huawei Honor 6 to Android 5.1.1 and B4A IDE stopped getting logs from Bridge .After...
 

[outdated] Perform GooglePlayBilling Subscription Up/Downgrade

This solution is deprecated and applied to the previous billing version.

Please do not use it.






--------------------------------------------------------

Based on Erel's solution to the...
 

Attachments

  • BillingTestApp011.zip
    75.2 KB · Views: 666
  • 2019-11-06_14-41-00.png
    2019-11-06_14-41-00.png
    34.5 KB · Views: 467
  • 2019-11-06_14-38-27.png
    2019-11-06_14-38-27.png
    75.1 KB · Views: 422
  • 2019-11-06_14-58-16.png
    2019-11-06_14-58-16.png
    60.2 KB · Views: 402
  • 2019-11-06_14-56-50.png
    2019-11-06_14-56-50.png
    62 KB · Views: 405
  • 2019-11-06_14-51-52.png
    2019-11-06_14-51-52.png
    51.6 KB · Views: 398
  • 2019-11-06_14-51-00.png
    2019-11-06_14-51-00.png
    37.9 KB · Views: 396
Last edited:

[Newbie sample] Simple Timer Up & Down, Counter Up & Down.

This is only a simple example for newbie to learn Wheel algorithm.
For fully blown of wheels, see ClsWheel v 1.4 by Klaus.
There is no intention to make it an advance Stopwatch & Timer!
Advance...
 

Attachments

  • TimerCounter.png
    TimerCounter.png
    27.5 KB · Views: 1,027
  • TimerCounter.zip
    49.9 KB · Views: 1,023
  • TimerCounterTD.zip
    50.1 KB · Views: 934
Last edited:

[IoT] XBee (ZigBee) Communication between Android and Raspberry Pi

Digi XBee modules are a great solution for wireless communication. Using two or more XBee modules you can create a wide area wireless network. The maximum range depends on the antenna and...
 

Attachments

  • RPiXBee.zip
    2 KB · Views: 1,325
  • AndroidXBee.zip
    10.6 KB · Views: 1,775

[Installation Guide] [B4A] Supermarket, Restaurant, Pharmacy, Store Delivery

Disclaimer: I do not create/own the original project source code therefore please don't ask me to provide full support. I am just helping a member to make this project work. I do not get any money...
 

[Installation Guide] Amazing Order Taking App

Disclaimer: I do not create/own the original project source code therefore please don't ask me to provide full support. I am just helping a member to make this project work. I do not get any money...
 

[Inline Java] Get The Method Name

Hi, there is attachment with example on how to get the method (b4a function - sub) name using Inline Java.
This can be useful in many cases, especially for error reporting - debugging, but there...
 

Attachments

  • GetTheMethodName.zip
    13.9 KB · Views: 517

[Example] Creating a sticky service - long running background tasks

Please see the original post:

About sticky service - long running background tasks...
 

Attachments

  • Services_example.zip
    9 KB · Views: 558
  • Screenshot_2016-11-25-12-23-53.png
    Screenshot_2016-11-25-12-23-53.png
    18.9 KB · Views: 581
  • Screenshot_2016-11-25-12-35-40.png
    Screenshot_2016-11-25-12-35-40.png
    77.4 KB · Views: 611
  • Screenshot_2016-11-25-12-37-41.png
    Screenshot_2016-11-25-12-37-41.png
    46.7 KB · Views: 590
Last edited:

[Example] Add OCR features to your Android application

This example demonstrates how you can use an OCR web service to recognize text in camera images.

The program allows you to take a picture and then send it to OCRWebService.

OCRWebService...
 
Last edited:

[Coordinates] Distance Features

I added a new feature to my apps yesterday, this feature show you as text how far you are from the other coordinate.

This looks so:

within 1 kilometer: very close
More than 1...
 

[B4X][OOP] Generic Sorter

The Sorter class uses quick sort algorithm to sort a list of objects.

There are exactly three assumptions about the list items:
1. All the items in the list are of the same type (or each item can...
 

Attachments

  • Sorter.zip
    8.2 KB · Views: 556

[B4X][IoT] - Monitor the home temperature with Adafruit IO

Adafruit IO is a cloud service built for IoT solutions. It provides two interfaces: MQTT and REST API. It is very simple to use it with B4X as demonstrated in this example.

It is more than...
 

Attachments

  • B4R_IO_Adafruit.zip
    1.1 KB · Views: 1,129
  • B4A_IO_Adafruit.zip
    8.1 KB · Views: 1,538
  • B4J_IO_Adafruit.zip
    2.4 KB · Views: 941
  • B4i_IO_Adafruit.zip
    3.6 KB · Views: 817
Last edited:
Top