B4J Tutorial Remote debugging with B4J-Bridge - Erel    May 4, 2026   (22 reactions)   tags: B4J Bridge, Remote B4J v1.80 adds support for remote debugging using B4J-Bridge, a tool similar to the beloved B4A-Bridge. The purpose of B4J-Bridge is to allow you to connect the IDE to a remote machine.... The connection is done over the network (usually the local network). Instructions Download b4j_bridge.jar to the remote machine: www.b4x.com/b4j/files/b4j-bridge.jar Note that you can download it with this command: wget www.b4x.com/b4j/files/b4j-bridge.jar 'or (remove space between 'c' and... B4J Tutorial [PyBridge] The very basics - Erel    Feb 17, 2025   (18 reactions) PyBridge is a framework that allows accessing Python libraries from within B4J. It works by starting a Python process that connects to the B4J process. The Python process receives commands from the B4J process and executes them. From the developer perspective it is very similar to accessing native APIs with JavaObject or with inline Java. There are two important differences: 1. The execution happens in a different process. 2. Python is nicer than Java. Especially with small code snippets and... B4J Code Snippet [PyBridge] Create barcodes - Erel    Feb 16, 2025   (12 reactions) Based on: https://python-barcode.readthedocs.io/en/stable/getting-started.html Usage: Wait For (CreateBarcode("code128", "abcdef")) Complete (Result As B4XBitmap) ImageView1.SetBitmap(Result) 'dependencies: pip install python-barcode "python-barcode" 'Types: Private Sub CreateBarcode (CodeType As String, Code As String) As ResumableSub Dim BytesIO A... B4J Library [PyBridge] Bleak - Bluetooth BLE - Erel    Mar 9, 2025   (17 reactions) Bleak is a Python BLE library: https://bleak.readthedocs.io/en/latest/index.html The attached project wraps this library and allows scanning for BLE peripherals, connecting, reading, subscribing and writing. The example project allows connecting to multiple devices at once. https://www.b4x.com/basic4android/images/java_vzc4t2s7Yj.gif Python dependencies: pip install bleak Depends on B4J 10.2 ... B4J Code Snippet [PyBridge] Read exif tags with exifread - Erel    Jan 16, 2026   (6 reactions) Based on: https://github.com/ianare/exif-py : "Easy to use Python module to extract Exif metadata from digital image files. Pure Python, lightweight, no dependencies. Supported formats: TIFF, JPEG, JPEG XL, PNG, Webp, HEIC, RAW" pip install exifread Private Sub ReadExifTags (Path As Object) As PyWrapper Dim Code As String = $" import exifread def ReadExifTags (Path): with ... B4J Tutorial [PyBridge][server] Using PyBridge in web apps - Erel    Mar 16, 2025   (11 reactions) PyBridge must be accessed from a single thread. In server solutions, each handler runs in its own thread so we need to add some barriers to ensure proper usage. The way to implement it is by adding a background worker dedicated to PyBridge. Other handlers make requests to this worker using CallSubDelayed and the worker responds with CallSubDelayed as well. This way the correct thread handles each part of the task. The attached example, uses python ascii magic (https://github.com/LeandroBarone... B4J Tutorial [PyBridge] Accessing MTP devices - Erel    May 29, 2025   (4 reactions) 164430 MTP - Media Transfer Protocol, is an important protocol that wasn't accessible from B4J (https://www.b4x.com/android/forum/threads/copy-file-from-phone-usb-cable-to-desktop-using-b4j-code.164058/post-1006196). It is an important protocol as this is the default USB connection method for Android devices, and the alternative methods to transfer files to a PC are not great. This solution ... B4J Library [PyBridge] LGPIO - Raspberry Pi GPIO - Erel    Mar 11, 2025   (6 reactions) Based on: https://abyz.me.uk/lg/py_lgpio.html Tested on RPi 5. It should be compatible with most boards. With the latest version of Raspbian, everything needed is preinstalled (Python and lgpio). For now the GPIO related features are wrapped. 162438162439 The attached example demonstrates the simple usage. The LGPIO class is inside the example. Make sure to call gpio.Close before ending the p... Other [PyBridge] B4J v10.2 BETA is available for download - Erel    Feb 19, 2025   (35 reactions) This update includes a new library named PyBridge, that allows using Python libraries from inside the B4J app. Python is leading the way in fields such as AI, LLM, image recognition and many others. Using PyBridge is not always trivial and it won't be the right tool for every task, however there are many things that weren't possible before and are now possible. And that is a good thing....b4x.com/b4j/files/beta.exe PyBridge is a big thing. I will write tutorials that explain how... B4J Code Snippet [PyBridge] [LOA] ListOfArrays - DataFrames - Erel    Apr 8, 2026   (9 reactions) DataFrame is a core type in many Python libraries. The following subs make it simple to convert LOAs to DataFrames and vice versa. 'Adds a converter that converts dataframes to a list of arrays (not LOA yet) when a dataframe is fetched. Private Sub AddDataFrameConverter Dim Pandas As PyWrapper = Py.ImportModule("pandas") Dim converters As PyWrapper = Py.Bridge.GetField("comm").GetField("serializator").GetField("converters") converters... Page: 1   2   3   4   5   6   7   |