Android Question How To: Jar to B4A Library?

QtechLab

Active Member
Licensed User
Longtime User
Hello guys,

I'm looking for a solution to add a java library to B4A, which comes from Android Studio. I have just the .Jar file and a .txt with the functions and structures definition.
How can i do the trick?
It is quite a big library.
 

DonManfred

Expert
Licensed User
Longtime User
You need to write a wrapper library (with java) for it. You can use SLC to compile it.
Alternatively you can call the methods using JavaObject. Example (same like @MarcoRome suggestion).

For both solutions you need to have some java knowledge.

Another alternative is to create a JobOffer in the JobOffer forum.
 
Upvote 0

QtechLab

Active Member
Licensed User
Longtime User
Well, i think i have to study a little bit of java then.
I've already done that wrapper in C# for .NET application, but this time will be harder D:
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I've already done that wrapper in C# for .NET application
You should have no problem with Java then. It is very similar to C#, the only thing that really catches me out switching between the two is string equality testing as Java doesn't do operator overloads so == for a string is still an identity check. You need to use <string>.equals() for string comparisons.
 
Upvote 0
Top