Tutorials & Examples

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

[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,933
  • Uri.zip
    11 KB · Views: 2,733

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: 328
  • mpAndroidPieChartJO.zip
    9.9 KB · Views: 290
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: 235

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: 203

[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: 276

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: 969
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: 777
  • CustomCardView.bas
    8.6 KB · Views: 744

[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: 408

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: 283
  • B4ARepositoryReader.zip
    11.4 KB · Views: 272

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: 292
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: 392
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: 256

Widget Layout (Resizable, Adaptive)

Not sure if this can be considered a Tutorial, my first attempt.
Lately I started to play with Widgets, mostly for curiosity.
The main problem I encountered was how to design the Layout to make it...
 

Attachments

  • Widget Test.zip
    214.6 KB · Views: 345
Last edited:

FREE Source Code's !

Hi all,

i have updated my webpage and decided to add a tutorial section.

My first tutorial is a simple calculator (+,-,*,/) there is a video tutorial incl. Source code on my site.

I will upload...
 

Attachments

  • t1calc.zip
    3.7 KB · Views: 3,449
Last edited:

[B4X] AS FloatingActionMenu - Open Menu above an item in a xCustomListView


In this example, I let the AS_FloatingActionMenu open over an item that is in a list, no matter...
 

Attachments

  • ActionMenu + CustomListView.zip
    182.1 KB · Views: 307

[B4X] AS TextFieldAdvanced - TitleMode (AboveTextField, FloatText and BeforeTextField)

Top