Tutorials & Examples

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

Perfect Crop + TouchImageView

Hi all i made a simple crop example, later many try and try its here
if this help someone :)

Im using the @warwound lib TouchImageView
many thx to @warwound

this sample have one...
 

Attachments

  • Crop Sample.zip
    496.3 KB · Views: 2,221
  • 10511109_807459332617618_2723995257439844685_n.jpg
    10511109_807459332617618_2723995257439844685_n.jpg
    41.9 KB · Views: 1,130
  • 10514572_807459602617591_7148849783199956125_n.jpg
    10514572_807459602617591_7148849783199956125_n.jpg
    47.5 KB · Views: 1,501
  • 10527643_807459462617605_5852512570621737594_n.jpg
    10527643_807459462617605_5852512570621737594_n.jpg
    57.2 KB · Views: 982
Last edited:

Automatic adjustment of system date and time through GPS (root only)

Attachments

  • GPS DateTime.zip
    10.4 KB · Views: 410
  • Android 6.png
    Android 6.png
    40.7 KB · Views: 476
  • Android 2.3.6.png
    Android 2.3.6.png
    13.9 KB · Views: 501

Simple Code Module to implemente a License file using StringFunctions Encrypt

B4X:
Type=StaticCode
Version=6.48
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
'******************************************************************************************************
'*...
 

Attachments

  • Licensing.bas
    3.5 KB · Views: 338

Colourful Indicator

It comes from here. The project displays as an example a colourful battery level indicator. Lib files are in the /files folder of the B4A project. The indicator will only update/redraw when...
 

Attachments

  • FitChart.zip
    42.2 KB · Views: 540
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: 564
  • Screenshot_2016-11-25-12-23-53.png
    Screenshot_2016-11-25-12-23-53.png
    18.9 KB · Views: 588
  • Screenshot_2016-11-25-12-35-40.png
    Screenshot_2016-11-25-12-35-40.png
    77.4 KB · Views: 622
  • Screenshot_2016-11-25-12-37-41.png
    Screenshot_2016-11-25-12-37-41.png
    46.7 KB · Views: 595
Last edited:

Auto send KeyCodes.KEYCODE_BACK at runtime

Hi,
How to send / trigger the KeyCodes.KEYCODE_BACK at runtime without user clicking it

tks
 

CuteR - with inlne Java Code

Attachments

  • CuteR.zip
    313.2 KB · Views: 357
  • core-3.2.1.zip
    483.9 KB · Views: 512

Simple time calculation based on EditText

On your form you use an EditText to input time. If you want to calculate with this, may be the following example will help:

B4X:
Sub AddTime(OriginalTime As EditText,HoursToAdd As Int,MinutesToAdd...
 

ScrollCoins - Using GameView to implement a scrolling grid

 

Attachments

  • ScrollingCoins.zip
    7.5 KB · Views: 1,211

Praise to the data type Map.

As you know, Map is a kind of list of pairs of data; each pair is composed of a key and a value which can be of any type.

An example that I believe can be useful:

You have a beautiful table...
 
Last edited:

Automatic backup of source files to zip after each compilation with Custom Build Action and 7zip

Here' s a batch file that will back up all your source files and zip it with 7zip with the datetime stamp on each successful compilation. Only external prerequisite is 7zip which is free.

It...
 

Attachments

  • Auto7Zip4B4A2016-08-31.zip
    1.1 KB · Views: 361
Last edited:

Slide Switch - On / Off

Switch.png


This is a very, very simple project implementing a slide switch with B4A code only. Track flag1 and flag2 to know the state of the two switches (i.e are the switches on or off)...
 

Attachments

  • JHSswitch.zip
    12.4 KB · Views: 983
Last edited:

Bluetooth Printing to HP Deskjet 100 Mobile

I took the BTPrint.zip and modified it to print to my HP Deskjet 100 Mobile using Bluetooth

Attached find a new Zip BTPrint-2.zip (did not want to confuse it with the other one) and a PNG files...
 

Attachments

  • BTPrint-2.zip
    6.9 KB · Views: 893
  • PrintOutExample.png
    PrintOutExample.png
    38.1 KB · Views: 806

Arabic Digital Clock

See attached B4A project. It implements a digital clock with Arabic numerals. You can edit the png files in the /files folder of the B4A project with something like GIMP and clean them up / change...
 

Attachments

  • ArabicDigitalClock.zip
    102 KB · Views: 679

My CustomView template - with AddToParent

I think CustomViews are great addition to B4A, one of it's best features, and a fantastic way to increase productivity, reuse code, and add intelligence to the views we use.

The ability to add...
 

send and receive messages between two devices or Device and PC using bluetooth

1. Looking for application sample b4A to send and receive text messages (chat system) over blue tooth between two mobiles

2. Looking for application sample b4A to receive messages and reply over...
 

Have Back and Front Camera's & has Flash (inline Java code)

This is just some simple inline Java code to check if a device has a Back facing camera, a Front facing camera, and a Flash (it requires the JavaObject library to be enabled).

1.png
...
 

Attachments

  • b4aHasFrontBackCameraAndFlash.zip
    8.8 KB · Views: 681

B4X - The best development tools for the connected world!

As B4R (Arduino) will soon be released, I've made a short video that shows some of the communication features available in B4X.

Make sure to watch it in HD mode:


The source...
 

Attachments

  • ConnectedWorld.zip
    25.5 KB · Views: 618

Animation without timer

Hi Guys

I would like to share with you something that most of you maybe allready know but also if there are some people that still dont know that, it could be very helpfull for them.

There are...
 

Attachments

  • animation without timer.zip
    224.4 KB · Views: 1,862
Last edited:

CallSubDelayed - Avoid Black Screen

This has plagued me for months... (drove me nuts!)

I would try to insert a record in a table within an activity (using CallSubDelayed2) - then start another activity and presented with a Black...
 
Top