Understand what is Java Object (or JavaObject)
As the name explains itself, this is something to do with Java.
Explanation:
To understand, you need to first understand what is object and class in programming.
This is a very basic concept that you first need to know in programming!
Let's take String class as an example, you can create a variable call "name"
Now name is an object of String type, which you can think it is from String class.
You can call any method (except it is Private) from String type.
example:
This type of object or class has methods that you can access through B4X IDE Intellisense when you type a dot.
JavaObject library allows you to use B4X to access Java (non B4X) class, methods and properties.
You cannot treat String same as JavaObject. They are
different types.
If the JavaObject calls a method to return String value and you assign it to a String object then the object is no longer a JavaObject.
example:
Dim jo As JavaObject = Something
Dim name As String = jo.RunMethod("getString", Null)
Log(name.ToLowerCase) '✔️
Log(name.RunMethod("getData", Null)) '❌
To use JavaObject,
you must fully understand what type of object you are working with and what methods are available. The methods are not listed in B4X IDE Intellisense.
Please read and understand the tutorials of using JavaObject.
The purpose of JavaObject library is similar to the purpose of Reflection library. Both libraries allow you to directly call Java APIs based on Java reflection features. JavaObject design is different than Reflection library and in most cases simpler to use. However JavaObject doesn't replace...
www.b4x.com
The #AdditionalJar module attribute (introduced in B4A v3.80) allows us to reference external jars. With the help of JavaObject it is now possible to integrate third party jars without a wrapper. This solution is good for "simple" libraries. If the API is complicated with many interfaces then...
www.b4x.com