Tutorials & Examples

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

TIP: Replace your Floats by Doubles

It may happen sometimes that, if your dealing with complex non-integer calculations, your code may not perform exactly the way you want to. I came across this problem when I was trying so create a...
 
Last edited:

AutoStarts - Complete App

What is it?
AutoStarts is an Android based software package for auto starting apps on your phone or tablet at bootup. It was mainly written to support the eHome product. It is fully...
 

Attachments

  • Screenshot.png
    Screenshot.png
    40.7 KB · Views: 1,370
  • AutoStarts.zip
    100.6 KB · Views: 1,446
Last edited:

Running B4A on a Mac - my experience

I hope this is the right sub topic to post this under. Didn't think it fitted anywhere else.
(Erel, is there a place for a General sub topic??)

I have recently written a blog post on my...
 

Auto starting your app

Hi all!

Here is what you need to auto start your app at boot up.
Create a service module and paste in the code below:


B4X:
#Region  Service Attributes
    #StartAtBoot: True
#End Region

Sub...
 
Last edited:

Simple switch button with image view

Hi
The application I'm writing I need switches, but not being an expert I arranged with some simple line of code. The result is good and does its work.
I used an image view and an int variable...
 

Attachments

  • SwitchButton.zip
    110.8 KB · Views: 1,256
  • screen.png
    screen.png
    32.9 KB · Views: 1,838
  • 2015-04-07 23_30_37-slide.png
    2015-04-07 23_30_37-slide.png
    163.5 KB · Views: 1,701
Last edited:

Add border to Views and change Checkbox graphic

Here are a couple of routines that may come in handy.

The first adds a background to a view which can have a fill color, rounded corners and a border color. This is useful for picking out views...
 

Attachments

  • screenshot.png
    screenshot.png
    25 KB · Views: 3,692
  • AddBorder.zip
    8.8 KB · Views: 1,823
Last edited:

Simple ComboBox concept: WORKS!

hey guys... since we cant enter text but only select in spinner...
i have a small simple concept that can make it like our old VB combo box

its got to do with... aligning an edittext and a...
 

Attachments

  • MyComboBox.zip
    7 KB · Views: 1,168

Create your layouts based on percentages

Attachments

  • lm PercLayout.zip
    16.6 KB · Views: 698
Last edited:

BitmapMeshView

You can play around with this. Posting the following:

B4A project (BitmapMeshView.zip)
Java Code (src.zip)

Amend the Java code to your liking.
Click on the blank screen once the project has...
 

Attachments

  • BitmapMeshView.zip
    209.8 KB · Views: 735
  • src.zip
    4.4 KB · Views: 738

Broken LCD Source code

Hi to all,special Erel :)
I have a source code that i gift to forum and all programmer in this forum
It is look like the Broken LCD App in Android app store.

you can see tutorial from below link...
 

Alternative way to create Progress Indicators

gifProgressIndicator.png


The attached project is a "short cut" that will enable you to create Progress Indicators for your projects. It makes use of GIF files to simulate the progress indicators. The B4A...
 

Attachments

  • JHS GIF LOADERS.zip
    433.2 KB · Views: 1,167
  • 27.zip
    309.5 KB · Views: 956
Last edited:

Simple Pong Game

Hey guys!!

Here's a simple example of a 2 player Pong game, using nothing more than the core library.
Please keep in mind that this is just the frame-work for what could be a more advanced game...
 

Attachments

  • Pong.zip
    355.4 KB · Views: 1,758
Last edited:

Google ARC Welder

World Time - 7 segment digital clocks x 6

WorldClock.png


The attached project creates 6 x digital clocks (simulating 7 segment display). It will display the default time of your device on all 6 the clocks when the app is launched. Click on...
 

Attachments

  • DigitalClockWorld.zip
    64.1 KB · Views: 1,440
Last edited:

libGDX and Parallax (scrolling) background with multiple layers

Hi.

This is example with two simple classes "ParallaxLayer" and "ParallaxBackground".
It help us to make scrolling backgrounds very easily in just few lines of code and
"unlimited" number of...
 
Last edited:

LoadBitmapSample -- How Well It Works

I thought I'd provide an interesting look at how well LoadBitmapSample works.

My current Game App that I'm working on generates a Release APK of 10MBytes in size.
The App has the following...
 
Last edited:

How to use ABPhysicsEngine and GameSprite View together

Hi

I would like to share with you this small example on how to use ABPhysicsEngine and GameSprite View together.

I would like to thanks the authors for those greate libraries...
 

Attachments

  • theProject.zip
    145.3 KB · Views: 820
Last edited:

A Binary Clock

BinaryClock.png
Noting other than the B4A core lib required...
 

Attachments

  • BinaryClock.zip
    13.8 KB · Views: 716
Last edited:

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,379
  • morseCode1.zip
    2.8 KB · Views: 1,145

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,233
Last edited:
Top