Tutorials & Examples

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

Mashy's Overview

Last edited:

INFO: AdMob v6.4.1 deprecation from 15th September 2016

Some more information regarding the deprecation of the AbMob SDK v6.4.1:

The email you have gotten about the SDK needing to be higher than v6.4.1 refers to a legacy, standalone Mobile Ads SDK...
 

For vs. While

While usually interchangeable, we should all be aware of one very important difference between these two cycles.
The For...Next cycle caches the "goal", the Do...Loop does not...
 

Automatic backup of source files to zip after each compilation with Custom Build Action and 7zip

Here' s a batch file that will back up all your source files and zip it with 7zip with the datetime stamp on each successful compilation. Only external prerequisite is 7zip which is free.

It...
 

Attachments

  • Auto7Zip4B4A2016-08-31.zip
    1.1 KB · Views: 361
Last edited:

Protect your Android application with the Licensing library

The licensing library allows you to use Android market licensing service to verify that the user is allowed to access your application.

Your applications sends a request to the local market...
 
Last edited:

Slide Switch - On / Off

Switch.png


This is a very, very simple project implementing a slide switch with B4A code only. Track flag1 and flag2 to know the state of the two switches (i.e are the switches on or off)...
 

Attachments

  • JHSswitch.zip
    12.4 KB · Views: 980
Last edited:

Localize your app using AndroidResources

Here's a short tutorial showing how you can add support for multiple languages to your B4A application using my AndroidResources library.

Native Android applications have built in support...
 

Attachments

  • Localization.zip
    7.6 KB · Views: 1,466

Bluetooth Printing to HP Deskjet 100 Mobile

I took the BTPrint.zip and modified it to print to my HP Deskjet 100 Mobile using Bluetooth

Attached find a new Zip BTPrint-2.zip (did not want to confuse it with the other one) and a PNG files...
 

Attachments

  • BTPrint-2.zip
    6.9 KB · Views: 891
  • PrintOutExample.png
    PrintOutExample.png
    38.1 KB · Views: 805

FileTransfer - Send and receive files with AsyncStreams

Last edited:

B4A Book Updated

Last edited:

B4XObject - B4A /B4J / B4i objects serialization

upload_2014-12-16_17-0-36.png
upload_2014-12-16_17-1-8.png


The RandomAccessFile libraries (B4A, B4J and B4i libs) include two new methods: WriteB4XObject and ReadB4XObject.

These methods are similar to WriteObject and...
 
Last edited:

Large & Searchable List with SearchView + B4XSerializator

Attachments

  • B4J_IndexBuilder.zip
    57.9 KB · Views: 1,575
  • LargeSearchView.zip
    733.6 KB · Views: 2,673
Last edited:

Modules Attributes

Basic4android v2.50 includes a new method for handling project and modules settings.

These settings are now set in the code itself. The menu items were removed...
 
Last edited:

[B4X] The Networker's Guide To The Galaxy


The purpose of this tutorial is to cover the various communication options available for B4X developers.

Will start with two important utilities:
 

AsyncStreamsObject - Send and receive objects instead of bytes

AsyncStreamsObject is a small framework built over AsyncStreams.

Instead of sending and receiving bytes, AsyncStreamsObject allows you to send and receive objects. This makes it much...
 

Attachments

  • AsyncStreamsObject.zip
    10.5 KB · Views: 3,992
Last edited:

Designer Scripts & AutoScale Tutorial

Attached you find a pdf tutorial about Designer Scripts & AutoScale.
It includes Erels Designer Scripts Tutorial and a new AutoScale Tutorial.
It's an extract of two chapters from the next...
 

Attachments

  • AutoScaleExample7.zip
    73.1 KB · Views: 10,257
Last edited:

Wrapping the jFugue Midi Programming jar (B4a & B4j)

Having just posted the jFugue jar file and examples of accessing it, I thought it would be a good opportunity to show how I would go about creating a wrapper in B4x for this.

This is only one way...
 

Attachments

  • jFuguePlayer.bas
    5.4 KB · Views: 365
Last edited:

Google Push Notification for dummies (GCM)

Widget preview images

Hi All,

Below are my notes on getting a widget preview image to appear in the widget list. The preview image appears in place of the app icon (if used).

1) Create a png with the preview in...
 

For beginners: How to communicate with a server using httputils2 (Part 1: php)

This tutorial is deprecated. You can still use it to understand the basic communication. A newer one can be found here...
 
Last edited:
Top