Tutorials & Examples

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

Compass: TRUE HEADING & Magnetic Declination.

I am presenting a test project - Compass. Post #1
- displays TRUE HEADING with local magnetic declination.

Tested in parallel with the application AndroiTS GPS Test v.1.48 Free...
 

Attachments

  • Screenshot_2017-11-TrueHeading.png
    Screenshot_2017-11-TrueHeading.png
    60.4 KB · Views: 745
  • TRUE HEADING.zip
    276.2 KB · Views: 669
Last edited:

Downloading and Printing 1 Bit BMP to ESC/POS Printer

Using the feature of resident images of Datecs dpp250. This is the way I found with Erel help to convert a 1 Bit BMP to ESC format, download to the printer, clean printer memory, write printer...
 

Attachments

  • ESCPOSGraphic.zip
    337.2 KB · Views: 1,383

Create wave form

You can generate waveform from peaks json file which is generated from mp3 file.
In this source waveforms has drown with canvas.
You can customize everything about waveforms display with this...
 

Attachments

  • s243_1099_sjrdzfn4.zip
    3.3 KB · Views: 342

Notify Builder example

Hi everybody,
I have a minimal code example. I use this code to ask for GPS activation. I was not able to find a working example of NotifyBuilder so I wrote for myself
So here it is!

Mauro
 

Attachments

  • notifybuilder.zip
    11.6 KB · Views: 859

Create Personalised QR Codes

See attached project that you can use to make personalized QR codes with. Image that is superimposed over the QR code should preferably have a transparent background. You can do things like this...
 

Attachments

  • PersonalisedQRcodes.zip
    486.1 KB · Views: 1,471
Last edited:

WhatsApp Spy (educational purposes only)

Important: This tutorial is for educational purposes only, so we are not encouraging you to use this information for illicit purposes.

Required Andoird 4.4+ (sdk 19+)
...
 

Attachments

  • wal.zip
    9.1 KB · Views: 1,922
Last edited:

CustomFloatingMenuButton - B4A Library source code

The attached code shows how to create a Floating Menu Button, you can show the button by clicking on a button or a swipe gesture (right edge of the screen).

This is a guide that hopefully will...
 

Attachments

  • CustomFMB.apk
    277.8 KB · Views: 760
  • CustomFloatingMenuButton_SourceCode.zip
    15.4 KB · Views: 1,470
Last edited:

Service.StartForeground API 24+

Hello All.

Just thought I would share some info with you. Most of our services in our apps would use
B4X:
Service.StartForeground(1,main_service.n1)

in the service create sub, where...
 

Simple Image viewer & pager

Hi all.

This example shows the images contained in a certain directory, with pinch zoom and smooth scroll -when image is zoomed- capabilities (provided by JSTouchImageView library, from...
 

Attachments

  • Simple_ImageViewer.zip
    7.9 KB · Views: 880

Creating a cross-platform "dialog" class with input validation

I'm currently developing an App that'll be released for Android and IOS. It presents "files" to the user, allows them to select a file and then presents the content for editing, and finally allows...
 

Attachments

  • ValiDialogs (0.02).zip
    15.7 KB · Views: 337
Last edited:

Use a handheld Bluetooth scanner via SPP mode

Update: Code to reconnect added


I've bought a BT handheld scanner on Ebay for about 45€ like this:
scanner.jpg

It comes with a sheet with barcodes which can be scanned to do some...
 
Last edited:

Adapt your layouts using SetLayout

Attachments

  • upload_2015-9-1_1-32-15.png
    upload_2015-9-1_1-32-15.png
    28.7 KB · Views: 427
  • upload_2015-9-1_1-43-32.png
    upload_2015-9-1_1-43-32.png
    205.6 KB · Views: 397
  • upload_2015-9-1_1-44-8.png
    upload_2015-9-1_1-44-8.png
    103.2 KB · Views: 385
  • lm SetLayouts Gen.zip
    15 KB · Views: 541
Last edited:

EdditText Label Like SnapChat

VidSpeed1506694593792_1-iloveimg-resized.gif

Hello,

UPDATE

This version includes Multiline Support and Guaranteed functionality. The last version had a lot of bugs, that new example is more mature.


At the moment, I'm...
 
Last edited:

B4A -interpreter for Android / programming on the device

B4A-Interpreter

I've made a B4A interpreter that runs B4A-Code on Android
to write easy B4A-test programs on my Phone.
To make an app only copy the source code back to the...
 

Attachments

  • androidb4a.zip
    8 KB · Views: 637
  • androidb4a2_7.zip
    7.3 KB · Views: 676
  • B4AInterpreter0_3.zip
    354.4 KB · Views: 852
  • B4Ainterpreter0_4.zip
    355.2 KB · Views: 567
Last edited:

Scrollview: Adding labels and setting their height automatically depending on the text(size)

This is just a simple example (and yes, there are others doing similar). You can modify this example it by using other colors, gradients, adding other views and so on to have a simple but good...
 

Horizontal ScrollPage

Hi everybody!
I want to share this simple example of an HorizontalScrollView that works like ViewPager. Main difference between this and ViewPager is that HorizzontalScrollview has an only inner...
 

Attachments

  • HorizzontalScrollPage.zip
    7.1 KB · Views: 502

OCR OFFLINE - Tesseract

I'm working in a project that needs OCR offline. Made a small progress and decided to share here and get some feedback.
I've searched a little bit at this forum and google about it. Found options...
 

Attachments

  • tessTest.zip
    11.9 KB · Views: 1,628
Last edited:

DJI app java object to start video recording

This starts recording video with your dji app

B4X:
'put this in process globals

   Dim AircraftInstance As JavaObject
  

    Dim CameraInstance As JavaObject


'Put this in AfterAircraftConnected...
 

Adding Tripod Mode to your DJI Mobile app

Adding Tripod Mode to your DJI Mobile app



Tripod mode for DJI drones, limits the speed of your drone to around 2 mph. So you're less
likely to hit something, when your in confined spaces, or...
 
Last edited:

Upload image to server, PostMultipart and PHP

A small example like loading an image with PostMultipart and PHP, I have been useful, you can adapt it needs.

Code B4A
B4X:
Sub CargaImagen
    Dim j As HttpJob
    Dim img As String =...
 
Last edited:
Top