Tutorials & Examples

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

Automatic Foreground Mode

This is a new feature added in B4A v8.0.

Starting from Android 8.0, services cannot be simply started while the app is in the background or not running at all. Background means that there isn't...
 
Last edited:

[B4X] [XUI] Msgbox

XUI library v1.4 adds support for asynchronous msgbox dialogs.

The API is simple:

SS-2017-10-19_15.27.39.png


B4X:
xui.MsgboxAsync("Hello", "World")...
 

Searching the nearest Coordinate in a Database

today i was in the requrement to write a search-routine in Database.
given was a table with lat an lon values. Goal was to find the nearest Entry.

Tablename: nw05
Fields: gidx (index), glat...
 

B4A connected to Memu

B4A Bridge connect to MEMU? Yes, you can.
Follow all instruction from this video:
I tested and work!!! (see images attached)

Thanks for TechAndMore (YouTube)
 

Attachments

  • B4A2MemuDisconnected.png
    B4A2MemuDisconnected.png
    79.1 KB · Views: 1,039
  • B4A2MemuConnected.png
    B4A2MemuConnected.png
    75.7 KB · Views: 1,032

For beginners: How to communicate with a server using httputils2 (Part 2: MySql)

Small update: I use Download2 instead of Poststring now. It handles some things for us like removing illegal space, etc. Otherwise some examples wont work as decribed.


Part 1...
 
Last edited:

[B4X] Create and use SQlite databases with "DB Browser"

I often use Sqlite for my apps and I came across "DB Browser". It's a free tool to browse and edit SQlite databases and tables. Download it from here: http://sqlitebrowser.org/ For B4J apps...
 

[B4X] Tip: Always set FTP.PassiveMode to True

I've just wasted an hour trying to understand why a desktop program that I'm using for many months failed to upload a file to a FTP server.
I realized that the only thing that was recently changed...
 
Last edited:

Android FTP tutorial

Last edited:

How to determine needed permissions from JavaObject code

Now and then there are JavaObject code snippets posted in the forum. Usually there are permissions required listed together with the code, but not always. Which could be because none are needed...
 

USB K8055 VM110

used library: ByteConverter 1.10, Core 8.0, RandomAccessFile 2.32, Reflexion 2.4 , USB 0.98
digital input only for this demo
k8055n.png
 

Attachments

  • USB K8055 VM110.zip
    193.3 KB · Views: 418

Dropbox SDK - get informed about changes in the used Dropbox

Related Libraries:
B4A Dropbox SDK V2
B4J Dropbox SDK V2

You need to know/remember the dropboxId of the account you are actually using/requesting. And the latest cursor.
Use...
 
Last edited:

TabHost tutorial

Last edited:

Android shake event with PhoneSensors

Using the phone accelerometer it is possible to handle shake events.
The problem is of course to decide if the stream of values represents a shake.

The Shake code module finds shake patterns and...
 

Attachments

  • Shake.zip
    27.9 KB · Views: 3,627

followed mission for dji phantom 3 standard & DJIV2.5 library

followed_mission for dji phantom 3 standard DJIV2.5 library
 

Attachments

  • followed_mission.zip
    90.3 KB · Views: 444
  • DJIV2.5.zip
    82.8 KB · Views: 425

HttpUtils2/PHP: GET vs POST methods

Of course there is more about to secure data transmissions between clients & servers. Please take this tutorial to think about to secure your communication as good as you can.


With...
 

Intent Filters - Intercepting SMS messages in the background

Old tutorial. Don't use services. Use receivers.
Broadcast receivers are program components that can handle broadcasted messages. These messages usually notify about a system event.

There...
 
Last edited:

FirebaseAdMob - Rewarded video ads

Edit: Google AdMob does support rewarded ads without mediation.
You can use this unit id to test it: rewardAd.LoadAd("ca-app-pub-3940256099942544/5224354917")
Make sure to use FirebaseAdMob...
 
Last edited:

Java 10 - B4A SDK Manager fix

As stated on THIS thread, the current SDK Manager (3.20) will display an error, to fix it, you will have to recompile it using the source code posted HERE and modify line 158

From...
 
Last edited:

Inputlist with images

hi

for one of my project, i needed an input list that includes images and i was thinking of using clv for that, but i really wanted to use the native input list so with CSBuilder it is very...
 

Attachments

  • InputListImage.zip
    15.1 KB · Views: 1,039
Last edited:

Wrapping Kotlin code and libraries for B4A

In this thread, I am publishing a series of 3 videos to show you how you can wrap Kotlin code and libraries to be used within your B4A-projects.

In order to really appreciate the content, you...
 
Last edited:
Top