Tutorials & Examples

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

[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...
 

[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:

[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: 568
  • Screenshot_2016-11-25-12-23-53.png
    Screenshot_2016-11-25-12-23-53.png
    18.9 KB · Views: 591
  • Screenshot_2016-11-25-12-35-40.png
    Screenshot_2016-11-25-12-35-40.png
    77.4 KB · Views: 625
  • Screenshot_2016-11-25-12-37-41.png
    Screenshot_2016-11-25-12-37-41.png
    46.7 KB · Views: 599
Last edited:

[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: 531

[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...
 

[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...
 

[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,343
  • AndroidXBee.zip
    10.6 KB · Views: 1,792

[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,040
  • TimerCounter.zip
    49.9 KB · Views: 1,040
  • TimerCounterTD.zip
    50.1 KB · Views: 942
Last edited:

[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: 683
  • 2019-11-06_14-41-00.png
    2019-11-06_14-41-00.png
    34.5 KB · Views: 491
  • 2019-11-06_14-38-27.png
    2019-11-06_14-38-27.png
    75.1 KB · Views: 440
  • 2019-11-06_14-58-16.png
    2019-11-06_14-58-16.png
    60.2 KB · Views: 421
  • 2019-11-06_14-56-50.png
    2019-11-06_14-56-50.png
    62 KB · Views: 424
  • 2019-11-06_14-51-52.png
    2019-11-06_14-51-52.png
    51.6 KB · Views: 420
  • 2019-11-06_14-51-00.png
    2019-11-06_14-51-00.png
    37.9 KB · Views: 415
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...
 

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

[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:

[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...
 

[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...
 

[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...
 

[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,321

[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,169

[UI] [B4A] Online Course App UI Example + Source Code

Attachments

  • Online Course.zip
    273.5 KB · Views: 1,334

[UI] [B4A] Real State App UI Example + Source Code

Attachments

  • Real State App.zip
    264.7 KB · Views: 1,020
Top