Tutorials & Examples

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

Webview & File.DirAssets - Enough Already

UPDATE: AFTER READING THIS POST, PLEASE REFER TO POST#5 FOR A BETTER SOLUTION (AT LEAST, IN MY OPINION).
a code module provided by member Ivica Golubovic allows you to continue using...
 

Attachments

  • assets.zip
    82.9 KB · Views: 535
Last edited:

GIF Movie Player

The attached project is an example using the XtraViews library.

If one of the classes in that library is called "MovieView" then let's play some animated GIF movies. :D


Have fun...
 

Attachments

  • GifMoviePlayer_Sample.zip
    59 KB · Views: 1,552
Last edited:

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: 923
  • JHS_Sudoku.zip
    167.3 KB · Views: 938

Calculator - RPN Calculator

This is an attempt to create a RPN calculator (Reverse Polish Notation - as per HP calculators). You can store (STO) and recall (RCL) values of register X. It will store and retrieve last value of...
 

Attachments

  • JHS_RPN_CALC_V2.zip
    387 KB · Views: 715
  • JHS_RPN_CALC_V1.zip
    387 KB · Views: 607
  • JHS_RPN_CALC_V3.zip
    389.6 KB · Views: 843
Last edited:

Firebase Messaging: Chat app without server

When you register to FCM your app will receive a FCM token. Another app can send a message to this token. Probem here: How do I know the token of another device/user? Usually you have a server...
 

Attachments

  • FCM_Show.zip
    33.5 KB · Views: 1,412

Wrapping for functionality

This post is aimed at those who may be new to programming concepts as well as b4a.

There are a lot of posts on the forum about wrapping java libraries for use with B4a, but that's not the only...
 

Attachments

  • MsgBoxWrapper.zip
    10.9 KB · Views: 413
Last edited:

RippleView

The attached project comes from here (I have conducted some open heart surgery on it). It is working perfectly on my 7" tablet but on my Samsung S4 mini, unlike what is the case on my...
 

Attachments

  • b4aRippleView.zip
    38.2 KB · Views: 963
  • JavaCode.zip
    145.6 KB · Views: 848
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: 773
  • CustomFloatingMenuButton_SourceCode.zip
    15.4 KB · Views: 1,487
Last edited:

TessBaseAPI ocr

hello, a small library of TessBaseAPI "tesseract4android-2.1.0" Ocr, you need to download tesseract4android-2.1.0.aar and junit-4.4.jar as Depends, for the tessdata languages...
 

Attachments

  • tess4.1.zip
    24 KB · Views: 455

Take a Screenshot with Inline Java Code

I have tested this on an Android 7.0 device only - take a screenshot of your activity. You need to enable the JavaObject library to make use of it.

@JordiCP solved my initial problem here...
 

Attachments

  • b4aTakeScreenshot.zip
    16.3 KB · Views: 935

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: 544
Last edited:

B4A and PHP REST

Thanks @Erel for free version that I plan to buy but donate instead.

I'll share my B4A knowledge in Thailand, your great product must popular, later.

PHP is well known for web developer...
 
Last edited:

Firebase Database working example

Hi,

I decided to post this working example in the hopes that it can be useful to some people, and also maybe eventually someone will update it. I find database one of the most useful things in...
 

Attachments

  • Working Firebase Database example simple (no credentials).zip
    480.4 KB · Views: 1,814
Last edited:

VideoView Alternative JavaScript

For those having problems with the Android Videoview, here is a possible alternative that may be worth trying.

It's a javascript open source HTML5 video player for playing videos in a webview...
 

Attachments

  • VideoJS.zip
    109.2 KB · Views: 2,069
Last edited:

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,231
  • 10511109_807459332617618_2723995257439844685_n.jpg
    10511109_807459332617618_2723995257439844685_n.jpg
    41.9 KB · Views: 1,136
  • 10514572_807459602617591_7148849783199956125_n.jpg
    10514572_807459602617591_7148849783199956125_n.jpg
    47.5 KB · Views: 1,510
  • 10527643_807459462617605_5852512570621737594_n.jpg
    10527643_807459462617605_5852512570621737594_n.jpg
    57.2 KB · Views: 990
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,070
  • morseCode1.zip
    2.8 KB · Views: 818

Audios for WhatsApp (CLV with 2 columns)

Hi all.
I've been looking at my old sources and found this example, and now I'm going to share it with you.

this example size is 14mb+ because have 200+ audios example.
The example use CLV with 2...
 
Last edited:

Using Facebook Login Without Social SDK

First up, there is a fantastic library called 'Social API SDK Wrappers' written by a guru 'Periklis Koutsogiannis'. If you need Facebook or any other social media related integration, please...
 

Attachments

  • SocialExample.zip
    12.6 KB · Views: 761

[TEST RESULT] a <> b vs. Not(a = b)

[UPDATED]

Lately I've fallen into the habit of using Not instead of <> for Boolean comparisons - eg: Not(a = b) instead of a <> b. I'm not sure why I started doing this - probably because I think it...
 
Last edited:

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