Tutorials & Examples

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

Create a REST API in php the easy way

There are numerous cases where you need to access data for your app and you need the simplest and fastest way of acquiring them. In those cases you definitely have to create an API which can be a...
 
Last edited:

URI content://media ... to real file

Hello
I created an application that manages about audio files, video and other files. I have used several things, including ContentChooser. ContentChooser returns files like "content://...
 
Last edited:

Download list of images with HttpUtils2 and CustomListView

Attachments

  • DownloadList.zip
    13.2 KB · Views: 6,097
Last edited:

Handling intents for images selected via a 'Share' menu

Thanks for your help Erel!!! I greatly appreciate your timely assistance, this active forum, the B4A community, and B4A itself!!! Gregg

Here's the Manifest file that incorporates two Intents...
 

SQLiteDB

Below you find an application with a SQLite database and a ScrollView based table.
What the program can do:
- Read a database, 'Load' button.
- Edit, modify or delete date sets (single- or...
 

Attachments

  • SQLiteDB1.jpg
    SQLiteDB1.jpg
    48 KB · Views: 14,243
  • SQLiteDB2.jpg
    SQLiteDB2.jpg
    50.7 KB · Views: 2,784
  • SQLiteDB3.jpg
    SQLiteDB3.jpg
    34.4 KB · Views: 20,312
  • SQLiteDB4.jpg
    SQLiteDB4.jpg
    41.4 KB · Views: 2,529
  • SQLiteDB5.jpg
    SQLiteDB5.jpg
    27.4 KB · Views: 2,779
  • SQLiteDB6.jpg
    SQLiteDB6.jpg
    49.7 KB · Views: 9,293
  • SQLiteDB7.jpg
    SQLiteDB7.jpg
    49.4 KB · Views: 2,766
  • SQLiteDB_V1_1.zip
    26.2 KB · Views: 4,181
  • SQLiteDB_2D_V1_5.zip
    28.5 KB · Views: 3,611
Last edited:

Dynamic creating of views "retrieved" from a database (php + MySql)

If you are lazy creating views "by hand" or you simply want a "form" depending on a MySql table take a look at this small app.

Type in the Database and Table Name and the IP-Address of the server...
 

Attachments

  • GetCol.zip
    479 bytes · Views: 1,454
  • MySqlViews.zip
    7 KB · Views: 1,574

Adding an animated gif to your app

Ya can do it like this.

Add a webview to your design, lets call it WebView1

make a file initially called whatever, banner1.txt in the Files folder of your project open it in notepad and write...
 
Last edited:

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: 740
  • Screenshot_2014-05-08-20-00-15.png
    Screenshot_2014-05-08-20-00-15.png
    168.1 KB · Views: 576
  • axis_device.png
    axis_device.png
    17.2 KB · Views: 582
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: 884
  • JHS_RPN_CALC_V1.zip
    387 KB · Views: 741
  • JHS_RPN_CALC_V3.zip
    389.6 KB · Views: 978
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: 743
  • screen_01.png
    screen_01.png
    165.3 KB · Views: 1,026
  • screen_02.png
    screen_02.png
    172.4 KB · Views: 885
  • screen_03.png
    screen_03.png
    100 KB · Views: 930

Use localhost server

Action List module - Creating a custom view

Attachments

  • ActionList.zip
    13 KB · Views: 2,006
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,135
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: 1,078
  • qrcodev21ehm6.zip
    443.9 KB · Views: 1,108
  • qrcodev4elm5.zip
    206 KB · Views: 1,041
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,851
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...
 
Top