Tutorials & Examples

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

Torch plus Morse code from the Flash and the Vibrator

The attached project has a dual purpose:
1. Send Morse Codes with the camera flash
2. Serve as a Torch

The Morse Code functionality might be useful when you are lost in mid ocean and need to...
 

Attachments

  • JHSflashMorse.zip
    84.4 KB · Views: 1,182
  • morseCode1.zip
    2.8 KB · Views: 944

Another Analog Clock

analogClock.png


See the attached project. It uses a library that wraps a project that you can find here. There are files in the Objects/res/drawable and Objects/res/values folders that this...
 

Attachments

  • AnalogClockB4A.zip
    125.8 KB · Views: 1,029
Last edited:

Analog Clock with Sound

Hi!

Since I've been messing around with trigonometry this week, I decided to give you guys an analog clock example. Enjoy!

B4X:
#Region  Project Attributes
    #ApplicationLabel: Analog Clock...
 

Attachments

  • analog.zip
    9.9 KB · Views: 1,183

Panel Blinking

Panels that blinks vertically and horizontally. Changes color/button/label/or any view for that matter.

EDIT 14 Nov 2014
Added modification to original Sliding Panels project by @Erel in...
 

Attachments

  • BlinkingPanelHorizontally V3.zip
    9.2 KB · Views: 687
  • BlinkingPanel.zip
    7.6 KB · Views: 690
  • SlidingPanelsUpDown V2.zip
    9.7 KB · Views: 672
Last edited:

Round Button - FunWithRoundButtons

Lib files are in the /files folder
 

Attachments

  • FunWithRoundButtons.zip
    93 KB · Views: 1,168

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

Async task help

Hi expert
i'm trying B4A coming from Appcelerator.
It is very fast and simply

I try to use a scrollview populated from a sqllite db cursor with many records
my scrollview is very slow when...
 

How to Find a Wooly Mammoth Part 1 (Extending the B4A List object functionality using inline Java)

Given the following class and code someone new to B4A might expect a different result to the one which is actually produced by the following code and class definition.

The Pleistocene_Mammal...
 

Attachments

  • Inline Java And Lists.zip
    2 KB · Views: 403

Flip 3D View

I came across the attached project here and thought it is quite nifty. It is a post by a B4A member (@Lyndon Bermoy )

Have added an additional imageview to animate a second image...
 

Attachments

  • Flip3DView.zip
    138.7 KB · Views: 1,168

Cryptography - MD5 & SHA-1 (inline java code)

It only prints to the log. Change the "message" in Sub Activity_Create
 

Attachments

  • Cryptography_MD5_and_SHA1.zip
    12.4 KB · Views: 1,361

imageManipulation (with inline java code)

imageManipulation.png


Done just for fun...work through the java code and you can create various derivatives for yourself by changing some of the code in some of the methods - eg add code to pass...
 

Attachments

  • imageManipulation.zip
    132.9 KB · Views: 997
Last edited:

SMS Incoming & Reply Separation

Good Day!

I've test this code to retrieve sms message, from my samsung, and it works.

' ------------------------------------------------------
Sub Process_Globals
Dim sms_idkey As Long...
 

SQLite, remote connection

Hello.
I have the following problem: I can not find an example of code written to run a remote connection to a SQLite DB.
I used the DRC to connect to a DB MS-SQL.
I do not understand if the DRC...
 

Multiple layout

I am trying to use the examples relating to layout or multiple panels . But all the files give me error "The value cannot be null" "parameter name: input Error File twolayouts1.bal: "I have read...
 

Library (JAR) interface using inline Java code and "direct calling"

Attached project demonstrates two ways to interface with a JAR file:

1. Using the JavaObject run method "directly"
2. Making use of inline Java code

For method 1 you need to make use of...
 

Attachments

  • JHS_JO_IJC.zip
    70.9 KB · Views: 829

Image - Various ways of Image Manipulation

Examples of image processing

Click on any one of the displayed images to change to an alternate image.

Made use of Jpeg library by @agraham

See...
 

Attachments

  • JHS_IMAGE_SWAP_ARGB_V1.zip
    466.2 KB · Views: 586
  • JHS_IMAGE_COLOR_BALANCE_V1.zip
    481.7 KB · Views: 555
  • JHS_IMAGE_CONTRAST_V1.zip
    466 KB · Views: 537
  • JHS_IMAGE_BITWISE_BLEND.zip
    149.2 KB · Views: 513
  • JHS_DITHERING_V4.zip
    41.5 KB · Views: 478
  • JHS_IMAGE_COLOR_SHADING.zip
    23 KB · Views: 533
  • JHS_IMAGE_COLOR_TINT.zip
    454.3 KB · Views: 548
  • JHS_IMAGE_CONVOLUTION.zip
    445.2 KB · Views: 537
  • JHS_IMAGE_DISTORT_BLUR_V1.zip
    429.2 KB · Views: 521
  • JHS_IMAGE_ERODE_DILATE.zip
    73.9 KB · Views: 522
Last edited:

Device Sensors

The attached project (with inline Java code) will list all the sensors on your device in the project's log.
 

Attachments

  • deviceSensors.zip
    11.2 KB · Views: 807

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: 1,054
  • JHS_Sudoku.zip
    167.3 KB · Views: 1,049

MidiSystem Recording example

This example loads a midi file and records an extra track from either the on board keyboard, or an external USB midi device.

Please be careful when saving files as the recorded track will be...
 

Attachments

  • Piano&FullMidiLib.zip
    19.4 KB · Views: 707
Last edited:

MidiSystem Drum sequencer

This example allows creation of loops on multiple tracks as they are played. Just like a drum sequencer. It demonstrates creating a midi sequence and tracks, and adding events and messages...
 

Attachments

  • DrumSequencer.zip
    30.5 KB · Views: 657
Top