Tutorials & Examples

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

Handle the soft keyboard with the IME library

Android has very good support for custom input method editors (IMEs).
The downside for this powerful feature is that interacting with the soft keyboard can be sometimes quite complicated.

This...
 

Attachments

  • IME_Example.zip
    14.8 KB · Views: 189
Last edited:

background voice recording

Hi..
I have created one activity that contains AudioRecorder using audiorecorder library.
i want to start and stop recording from background using service.
timer is not working to stop...
 

[Closed] Solutions to "The filename or extension is too long" error

This issue was solved with the B4A 13 Beta 6.

I saw many users (include me) with the problem "The filename or extension is too long", when try to compile the project with...
 
Last edited:

Align the AES encryption and decryption results between B4X and the .NET platform

A C# friend who uses MAUI to develop Android apps, but the friend works well, so I recommend him to use B4A, and he got started after a few hours of basic tutorials. He implemented a way to make...
 

Attachments

  • AES B4X and .NET is the same.zip
    142.4 KB · Views: 119
Last edited:

[B4X] AS Settings - Change Description Text on the fly


How to change the description text of a property:
B4X:
AS_Settings1.MainPage.GetProperty("ExportDatabase").Description =...
 

Getting file info using uri from content chooser or from received shared file - example

example of getting file property information from uri provided by content chooser or received file shared to the app. Curtesy of Erel’s example: Received Share. Shows File name, Mime Type...
 

Attachments

  • Screenshot_uriexample.jpg
    Screenshot_uriexample.jpg
    341.8 KB · Views: 2,771
  • Uri.zip
    11 KB · Views: 2,586

mpAndroidCharts - Various Charts using JavaObject

Have never done a B4A "wrapper" before making use of JavaObject only and thought I would see if I could get the PieChart of mpAndroidCharts implemented by using B4A's JavaObject only...
 

Attachments

  • mpChartLib.jar
    360.7 KB · Views: 204
  • mpAndroidPieChartJO.zip
    9.9 KB · Views: 188
Last edited:

Exoplayer track video resolutions

Hello friends, i wanna share with you a code that can you use it to get video resolutions avilables in played video (m3u8,mp4 ...) and show it in listview to select one of this qualities; :
do not...
 

Attachments

  • video_qualities.jpg
    video_qualities.jpg
    37.9 KB · Views: 147

Simple function to convert Markdown Text to CSBuilder Format

This simple function converts Markdown-formatted text so that it can be used as CSBuilder.

This is particularly useful if, for example, you have created a text in MS Word with bold and...
 

Attachments

  • md2cs.zip
    9.6 KB · Views: 108

[B4X] AS Onboarding - Dark and Light mode switch


In this example I show how you can easily change the theme e.g. from a dark theme to a light one and how to...
 

Attachments

  • Light and Dark Example.zip
    246.5 KB · Views: 162

Background location tracking

SS-2018-11-29_15.48.38.png


Simple example of a foreground service that keeps the process running in the background. The current location is shown in...
 

Attachments

  • MyLocation.zip
    10.6 KB · Views: 542
Last edited:

select image from device and upload in server

well hi too all .
As the title suggests, I want to teach you how to upload photos
I had searched a lot about it myself and had not found any results. By changing other people's codes, I was able...
 

CustomCardView Base On CustomListview Module

This is a module base on CustomListview, all function same with CustomListview I call it CustomCardView. Hope this help.

B4X:
For I = 0 To 5
'(the 47%x is cardview width, and the 45%y is the...
 

Attachments

  • CustomCardViewExample.zip
    14.2 KB · Views: 682
  • CustomCardView.bas
    8.6 KB · Views: 654

[B4X] Supabase - Call a Postgres function (RPC)


Perform a function call.
You can call Postgres functions as Remote Procedure Calls...
 

Google Play Billing v.7 Subscription Example

This is a modified example, based in the original example from @Erel.
The previous example only make purchases.
This new example utilizes the Google Play Billing library v.7, changes...
 

Attachments

  • BillingExample7.zip
    11.1 KB · Views: 238

Share Text File Between 2 Apps

This is just another example based on the ManageExternalStorage class provided by @agraham.
It is a response to this question.

B4ARepositoryWriter - writes a text file to an...
 

Attachments

  • B4ARepositoryWriter.zip
    11.3 KB · Views: 191
  • B4ARepositoryReader.zip
    11.4 KB · Views: 185

Http Server hosting a page with download link

Just a simple example with a link to a file stored in File.DirInternal.

Required Archiver library.

1717247361585.png


This is a response to this thread.
 

Attachments

  • HttpServer.zip
    12.4 KB · Views: 200
Last edited:

Share SQLite database between 2 devices

This is just a proof of concept to show that Device A behave like a server hosting a database and Device B connects to it accessing the "shared" database. It is a response to this question...
 

Attachments

  • ShareDB.zip
    17.6 KB · Views: 309
Last edited:

Example Spinner to Bold, Italic or other typeface

Widget Layout Background

I'm just trying to add a background image to the 4x1 widget from the following excellent thread...
 

Attachments

  • Widget Test.zip
    193.5 KB · Views: 186
Top