Tutorials & Examples

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

Local High Score Leaderboard

Attachments

  • LocalHighScores.zip
    8.2 KB · Views: 591
Last edited:

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: 634
  • JHS_IMAGE_COLOR_BALANCE_V1.zip
    481.7 KB · Views: 606
  • JHS_IMAGE_CONTRAST_V1.zip
    466 KB · Views: 580
  • JHS_IMAGE_BITWISE_BLEND.zip
    149.2 KB · Views: 554
  • JHS_DITHERING_V4.zip
    41.5 KB · Views: 521
  • JHS_IMAGE_COLOR_SHADING.zip
    23 KB · Views: 573
  • JHS_IMAGE_COLOR_TINT.zip
    454.3 KB · Views: 610
  • JHS_IMAGE_CONVOLUTION.zip
    445.2 KB · Views: 579
  • JHS_IMAGE_DISTORT_BLUR_V1.zip
    429.2 KB · Views: 569
  • JHS_IMAGE_ERODE_DILATE.zip
    73.9 KB · Views: 574
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: 861

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

Different examples with 2 layouts

As an answer to the thread Forms alike, I thought that the examples below would be of general interest.

Attached there are 4 examples with two same layouts but with different managements...
 

Attachments

  • TwoLayoutActivities.zip
    14.1 KB · Views: 2,282
  • TwoPanelActivity.zip
    12.4 KB · Views: 1,896
  • TwoPanelLayouts.zip
    14.5 KB · Views: 2,025
  • TwoActivityLayouts.zip
    8.7 KB · Views: 1,622
Last edited:

Nine patch images tutorial

Android supports a special format of PNG images that can be resized by replicating specific parts of the image.
This images also include padding information.
These images are named nine-patch...
 

Attachments

  • NinePatchExample.zip
    7.4 KB · Views: 2,780

Tip: Distributing your app on iis web server

After hours of research i was able to create a download link for my app on a windows server. here are the instructions for doing so.

under iis create a mime type by right clicking on your...
 
Last edited:

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: 777
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: 709

MidiSystem Example PlayOnly USB

This example allows playing a midi file to an external USB device which you can select. It also allows delaying the messages send to the usb device so you can hear them at the same time as the...
 

Attachments

  • PlayOnlyUSB.zip
    16 KB · Views: 739
Last edited:

OAuth Facebook Feeds

Attachments

  • ff.zip
    9.8 KB · Views: 1,247

USB Serial service

Hi all,

My contribute to the community a USB Serial service, you can add more activitys...

If you like this please press "like"

Thanks

camolas
 

Attachments

  • UsbSerial_respose_service.zip
    9.7 KB · Views: 1,071

TTS service for 2 Activitys

Hi all,

My contribute to the community a TTS service for 2 Activitys, you can add more activitys...

If you like this please press "like"

Thanks

camolas
 

Attachments

  • Two Activites tts service.zip
    10.1 KB · Views: 491

WebView Tutorial

WebView tutorial

I wanted an easy way to provide in-app documentation such as help screens etc.

I was thinking of going with the CustomListView and then trying to colour some of the lines of...
 

Attachments

  • WebView2Empty.zip
    142.3 KB · Views: 5,025
Last edited:

Arduino ADk Consummation

Introduction

The big day has dawned at last. We are now going to connect our Arduino to our Android device and get the two to talk to each other and to their own IDE on the PC...
 

Attachments

  • AdruinoADK.zip
    8.6 KB · Views: 1,603
Last edited:

Pebble Example

This is an example of how to build an app and sent intents to your pebble.
 

Attachments

  • PebbleExample.zip
    9.2 KB · Views: 560

Googlemaps V3 In A Webview

Hi Everyone,

Until the mapview becomes available, I have managed to "squeeze" the googlemaps V3 JS API into a webview for an app I am working on :sign0060:

The benefit of the JS map over a...
 

Is possible Start Activity in a Panel?

I have many layouts split by a scroll view, and on any layout i have a lot functions. Is possible divide any of this in more activity starts on panel on scroll view? Thanks
 

JQMobile.Show

Sharing the goodness. An attempt to have JQuery Mobile controls inside a webview running inside B4A.

Check this post...
 

Open the browser with a specific web page

Opening the browser is very simple.
First you need to add a reference to the Phone library.
Then:
B4X:
    Dim p As PhoneIntents
    StartActivity(p.OpenBrowser("http://www.b4x.com"))
...