B4ASnippetMaths
Conversion of decimal numbers to neat integer fractions
Conversion of decimal numbers to neat integer fractions
@ShepSoft · 2020-07-14
B4ASnippetCharSequence / CSBuilder
Tip: CSBuilder usage
Tip: CSBuilder usage
@ShepSoft · 2020-07-07
B4ASnippetDate/time
Timer not exact enough for sending to stream
Timer not exact enough for sending to stream
@Midimaster · 2020-06-28
B4ASnippetMail
Simple and Reliable User Feedback/Bug Reporting Method
Simple and Reliable User Feedback/Bug Reporting Method
@JohnC · 2020-06-25
B4ASnippetJava
Using StartActivityForResult with JavaObject
This code demonstrates how JavaObject can be used to call external APIs that should be called with Context.startActivityForResult.
@Erel · 2020-06-18
B4ASnippetB4A
Version safe notification
Update: If you are using B4A v8.0+ then the standard notifications will work. Older versions:As explained in this tutorial all store apps will soon be forced to target the latest SDK. The following code can be used to create a notification. It works on all versions of Android.
@Erel · 2020-06-12
B4ASnippetList- and scrollview
PullToRefresh 2
This is an example of a pull-down refresh animation that I recently wrote
@cxbs · 2020-06-08
B4ASnippetGPS/location/maps
Sample using GPS and GeoAddress
Sample using GPS and GeoAddress
@joaquinortiz · 2020-06-07
B4ASnippetPermissions
Explain to user why you need a permission before displaying Android''s cryptic permission prompt
Sample code I use to display the reason why my app needs a particular permission so that the user is well informed of it before I let Android display it''s cryptic permission prompt.
@JohnC · 2020-06-06
B4ASnippetDate/time
Getting date time from the internet
Getting date time from the internet
@Steve Kwok · 2020-06-03
B4ASnippetImages
FontAwesome To Bitmap
Unlike an older "TextToBitmap" sub that you can find in the forum, this code vertically centers the icon. It can also be used in B4J and B4i (only need to change the font line).
@Erel · 2020-06-02
B4ASnippethttp
Disable automatic redirections with OkHttpUtils2
Disable automatic redirections with OkHttpUtils2
@Erel · 2020-06-01
B4ASnippetFile handling [PATH]
get all image folders [path]
Get all image folders [path]. This code runs on my phone in release with 156ms. And i have over 1k folders and over 10k images.
@Alexander Stolte · 2020-06-01
B4ASnippetToast
My ToastMessageShow
My ToastMessageShow
@T201016 · 2020-05-27
B4ASnippetWifi
Access Wifi Information
This code takes care of requesting the location permission which is needed on Android 8+
@Erel · 2020-05-18
B4ASnippetPDF
Print PDF library supports higher resolution
Print PDF library supports higher resolution
@MitchBu · 2020-05-18
B4ASnippetFile handling
External Storage - Simple Example
Enclosed is a simple call to storage , creating a directory and copying files from DirInternal using ExternalStorage Class
@rodmcm · 2020-05-13
B4ASnippetDrawing
Drawing Multiline Text
This code creates a label with the text and returns a snapshot of the label
@Erel · 2020-05-12
B4ASnippetBarcode/scan
HTML-Standalone QR-code generator for websites
Sometimes you need a QR-code generator in your website (which is working together with B4x). I searched for a standalone creator which is easy to handle. I came to this site: QR-code generator. I uses Javascript to generate the QR-code. I''ve modified the example (removed all inputfields and replaced them with simple variables).
@KMatle · 2020-05-04
B4ASnippetGPS/location/maps
WGS 84 reader
Code that reads Wgs84 coordinates DDmmss.ssss / DDmm.mmm / and DD.ddddd and converts to floating point coordinates
@booch34 · 2020-04-29
B4ASnippetFile xfer [INCLUDED]
Upload a file to your server with HttpJob and php[included]
Upload a file to your server with HttpJob and php[included]
@scottie · 2020-04-26
B4ASnippetFile handling
Delete oldest files, if no free space
Delete oldest files, if no free space
@peacemaker · 2020-04-25
B4ASnippetB4A
Swipe left-right between activities
To swipe left-right from one activity to another without panels, buttons or tabs.
@WN van Surksum · 2020-04-08
B4ASnippetNotifications
Change notification background color
Change notification background color
@Mrphone · 2020-04-01
B4ASnippetDatabase
SQLite - check table exists
SQLite - check table exists
@Alexander Stolte · 2020-03-22
B4ASnippetNotifications
Allow user to select custom notification sound and have complete control over playing it
Allow user to select custom notification sound and have complete control over playing it
@JohnC · 2020-03-11
B4ASnippetSlider
RoundSlider Min/Max Values
I''ve just changed the XUI Views Library to have Min/Max Properties editable at runtime
@advansis · 2020-03-11
B4ASnippetTable/Grid
B4XTable Tricks
1) Find navigation panel and switch positions with search filed 2) Add click event to page number, the pageButton event will open a dialog to specify a target page (you need to add a B4XDialog and set B4XTable1.CurrentPage = InputTemplate.Text) 3) Light theme for search field
@William Lancee · 2020-02-19
B4ASnippetImages
Resize Bitmap with a maximum Byte limit
Sometimes the images we use in our Apps are overly large. In some cases, images are entered by the user and therefore we do not know the size. And to manage them we need them to fall within a certain Byte limit. How to reduce them within the limit? Here is a code that allows you to redimension the images while maintaining the proportion and returning within the Byte mitie that serves us
@Star-Dust · 2020-02-01
B4ASnippetImages
LoadBitmapResize conundrum
LoadBitmapResize conundrum
@drgottjr · 2020-01-17