Tutorials & Examples

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

[Newbie sample] Simple Timer Up & Down, Counter Up & Down.

This is only a simple example for newbie to learn Wheel algorithm.
For fully blown of wheels, see ClsWheel v 1.4 by Klaus.
There is no intention to make it an advance Stopwatch & Timer!
Advance...
 

Attachments

  • TimerCounter.png
    TimerCounter.png
    27.5 KB · Views: 1,178
  • TimerCounter.zip
    49.9 KB · Views: 1,213
  • TimerCounterTD.zip
    50.1 KB · Views: 1,091
Last edited:

On Intents opening files

Just thought I would post a few things I have learned about intents. Using them does not seem to be particularly intuitive and information is sparse. Here is a link to a thread someone started for...
 
Last edited:

List of known android "Intents" to do stuff

I saw and example here and there for intents, but I noticed it takes a bit of guesswork to figure out what strings to pass sometimes so i'm starting a list of known intents. If you know any...
 

Take pictures with the internal camera

It is recommend to use the new CameraEx class. It provides more functionality.
The new Camera library allows you to take pictures using the back facing camera.

The following steps are...
 

Attachments

  • CameraExample.zip
    5.7 KB · Views: 10,427

Collection of tutorials in PDF format

Edit: This resource is no longer available. Better resources are available here: https://www.b4x.com/etp.html

You can now download a PDF file that contains most of the tutorials. The...
 
Last edited:

Creating a build number for your project's compilation

It has been discussed in other places on wish lists etc that each time we compile our projects under B4A that it would nice to have a BUILD number increment by 1.

Using the CustomBuildAction...
 
Last edited:

Twitter feed reader

This example no longer works as it is based on an old Twitter API.
An updated example is available here...
 

Attachments

  • TwitterDemo.zip
    40.5 KB · Views: 4,026
  • Twitter.apk
    122.9 KB · Views: 1,344

Simple Socket Class

Hi All

I have created a simple socket class for a project we a doing. Thought I might share it. Hopefully it will be of use to others.

Regards

John.

B4X:
Type=Class
Version=2.71...
 

Attachments

  • sockets.bas
    3 KB · Views: 823
Last edited:

Barebones View Examples with SQLite

I went through a (long) learning curve with regard to using SQLite, and creating Webview, Listview and Scrollview lists. There are a lot of great examples on this forum, but I found it difficult...
 

Attachments

  • DataBase_Barebones_examples.zip
    47.8 KB · Views: 1,585

Holy moley, take the work OUT of creating icons for your app!

Flickr Viewer

Attachments

  • FlickrViewer.zip
    7.2 KB · Views: 1,974

How To: Turn your app into a Home Screen launcher (with B4A)

This is extremely easy and many of you may already know how to do this, however, for those who do not, here is how.

In your Project Menu: Click on: "Do not overwrite Manifest File". It will...
 

Transparent activity

Ok here is the transparent activity project, it is very simple, i used it in the fake virus app.

Make a folder in the objects->res folder, and name it values.
Copy the file from the folder in...
 

Attachments

  • transparent.zip
    4.9 KB · Views: 1,700

Scrolling Marquee with ListViews

Wanted to have a smooth scrolling message for an initial screen in one of my programs, and couldn't find anything pre-built into Android, so of course, something that should have taken just a few...
 

Attachments

  • AdvMarquee.91.zip
    12.2 KB · Views: 1,009

Grid Sample

Hey all,

This grid is like an open source project. It is completely written in a seperate B4A module and allows paging, 'custom' column types, horizontal and vertical scrolling, summation and...
 

Attachments

  • ProAppGridDBSample.zip
    51.7 KB · Views: 1,827
  • ProAppGridSample.zip
    35.5 KB · Views: 1,574
  • ProAppGridAdvSample.zip
    37.9 KB · Views: 1,464
Last edited:

Accessing remote DBs with B4A using HttpUtils2, Classic ASP, IIS 5.1 and MSAccess

Note: the attached project contains CLASSIC asp scripts and NOT asp.net scripts.


I have a propriatary PC app that uses MSAccess.
The author is good enough to leave the MSAccess .mdb tables...
 

Attachments

  • HttpUtils2withASPandMSAccess.zip
    24.9 KB · Views: 1,373
Last edited:

Very light and simple to use SQLite database browser, editor and creation

Your own content - chooser

Hi!

some days ago i shared my ahaShareLibrary and if you like to do your own library with your own code, this small tutorial may help you..

The project need following:
o) Reflection
o)...
 

Attachments

  • shareExample.zip
    44.8 KB · Views: 690

How to make screenshots!

I think one of the easiest way is using Android SDK tools. I'll explain this method using Windows, but in Linux or Mac should be similar. This is what you have to do:
-Connect your mobile to...
 

Keep app from closing on back key press

I have an app that opens web pages from a menu. Having trouble getting it to NOT close every time you click the android back button (drops out of app).

Tried this code:

Sub...
 
Top