Tutorials & Examples

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

LibGDX Sensor Access

I'm currently messing about with libGDX and will be using the Accelerometer for input. I borrowed some code from the web and B4A'd it. It includes device rotation, orientation, resolution, X, Y, Z...
 

Attachments

  • sensors.zip
    5.2 KB · Views: 671
  • Screenshot_2014-05-08-20-00-15.png
    Screenshot_2014-05-08-20-00-15.png
    168.1 KB · Views: 526
  • axis_device.png
    axis_device.png
    17.2 KB · Views: 527
Last edited:

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: 807
  • JHS_RPN_CALC_V1.zip
    387 KB · Views: 684
  • JHS_RPN_CALC_V3.zip
    389.6 KB · Views: 921
Last edited:

Windows 8 B4x File Change Tracking

Sometimes it is necessary to restore a previous version of your b4x projects/Project
you have made multiple changes but can not remember what was changed and you have to go back to a working...
 

google map what intent

Hi all, how can from button, show map location on google ? (without webview)

thanks
 

Slide Panel

Here another Slid Panel.
I use the Ultimate List View ( paid from Informatix ) to swipe control, but someone can adapt the gesture library.

In the first time no image will appear in background...
 

Attachments

  • SlidePanelHSP.zip
    17 KB · Views: 677
  • screen_01.png
    screen_01.png
    165.3 KB · Views: 966
  • screen_02.png
    screen_02.png
    172.4 KB · Views: 835
  • screen_03.png
    screen_03.png
    100 KB · Views: 878

Use localhost server

Action List module - Creating a custom view

Attachments

  • ActionList.zip
    13 KB · Views: 1,942
Last edited:

B4LinuxInstall script to use B4X tools in linux

Last edited:

2-Step verification - Sending email through Gmail

This isn't what I would call an actual tutorial, it's more like a very useful tip.

PLEASE NOTE: I'm not claiming that this is the only way to fix the issue, or even the correct way. But...
 
Last edited:

Android multitouch tutorial

Using Agraham's Gestures library we can handle multitouch events.

This is an example of a simple drawing application that supports multitouch...
 

Attachments

  • MultitouchExample.zip
    7.3 KB · Views: 1,053
Last edited:

QR Code - Reverse Engineering a QR Code

pic1.png


I am leaving this project here for now. The majority of the work has been done to extract the critical information of a QR code - it is reported in the text box to the right of the qr...
 

Attachments

  • JHSQRCODEREADV4.zip
    19.7 KB · Views: 989
  • qrcodev21ehm6.zip
    443.9 KB · Views: 1,032
  • qrcodev4elm5.zip
    206 KB · Views: 966
Last edited:

Update a homescreen widget more frequently than 30 minutes

Normally a homescreen widget can only update itself every 30 minutes. A lower value is not possible in the ConfigureHomeWidget() call.

But what if you want to create something like a clock which...
 

Attachments

  • AHClock.zip
    5.7 KB · Views: 1,779
Last edited:

Google Play: "Designed for tablet screens"

A change is coming up on November 21 on Google Play. The applications considered by Google as not designed for tablets will be marked as designed for phones and, by default, won't appear for...
 

5 Card Poker Scoring

Hi all.

Here is a BAS module to do 5 card poker scoring. Its some ugly code but it works.

I have promised myself I was going to re-write this code for over a year but cannot seem to find the...
 

Attachments

  • cards.zip
    37.4 KB · Views: 819
  • poker scoring v0.91.zip
    10.2 KB · Views: 551
  • poker scoring v0.92.zip
    10.2 KB · Views: 657
Last edited:

Uploading Photo to Facebook

Uploading Photo to Facebook is possible now with B4a and a webview



This is based on Steve05 post here...
 

Attachments

  • Android2Facebook.zip
    115.4 KB · Views: 1,612
Last edited:

Information about Smart Gear components

Hello Everybody,

In a new device SMART GEAR Live have a limitation with SDK, is not allowed put WEBVIEWs in a project.

In a B4A is accepted the WebView BUT in REAL not work...
 

Attachments

  • ErrorSmartGear.jpg
    ErrorSmartGear.jpg
    20.9 KB · Views: 372

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

SQL Order + Where

What am I doing wrong

B4X:
oRst = SQL.ExecQuery2("SELECT * FROM Bustrip ORDER BY sort Asc WHERE bus = ?", Array As String (Main.find))
 

Custom transitions between activities

This short tutorial will explain how to create custom transitions between activities.

The transitions must be declared in an XML file as described here: Animation Resources | Android...
 

Attachments

  • FlickrViewer_WithActivityAnimation.zip
    11.1 KB · Views: 3,697

When to use activities and why.

Why use Activities?

In B4A as in Android, an activity is like a form in other languages such as Delphi, C++ Builder, VB, etc. Activities can start other activities, use code modules, classes, and...
 
Top