Android Question Creating AAR Libraries (maybe in the future?)

MMORETTI964

Member
Licensed User
Longtime User
I know, at now is not possible and I have to wrap an AAR inside Eclipse.

More and more libraries coming with AAR: I found in the last month already three new (or updated) libraries coming in AAR (previous version in JAR with Eclipse) and cannot use JavaObject because I need callbacks.

Maybe is an intent :))) for the future to create this direct link?

Many thanks.

PS: Really B4x is one of the best and rapid IDE I've seen...
 

MarcoRome

Expert
Licensed User
Longtime User
What mean
and cannot use JavaObject because I need callbacks.
If you know Javaobject you can do everything or almost everything :D in same cases is better wrapper of course.
Look better this example in JavaObject:
Accesing third party Jar with #Additionaljar and JavaObject - Picasso by @Erel
Android Speech Recognition API Wrapper by @stevel05
PDFDocument API 19+ by @stevel05

Anyway a lot Master Wrapper ( as @DonManfred , @Johan Schoeman , @corwin, etc. the list is very long :D ) they have already released libraries that recall aar file.
 
Upvote 0

MMORETTI964

Member
Licensed User
Longtime User
I need to use some AAR libraries / sources and I can't use JavaObject due to CallBacks, so I need a wrapper. And I can't work directly on the Android Studio project, I still need work with Eclipse with jar extracted from the aar.

I need to get / compile / changing the project in Android Studio to get the aar, get the Jar to compile Eclipse, and produce jar to libraries directory.

It would be fantastic if I can use aar as my library without having to switch to Eclipse / Android Studio (don't know what means adding support for creating wrappers directly in aar).

It's only to save more time... in perfect B4A-style ideas.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

corwin42

Expert
Licensed User
Longtime User
I need to use some AAR libraries / sources and I can't use JavaObject due to CallBacks, so I need a wrapper.

There is JavaObject.CreateEvent() and JavaObject.CreateEventFromUI() for creating callbacks.

And I can't work directly on the Android Studio project, I still need work with Eclipse with jar extracted from the aar.

I need to get / compile / changing the project in Android Studio to get the aar, get the Jar to compile Eclipse, and produce jar to libraries directory.

You can create your wrapper library in AndroidStudio and create an AAR which can be used (more or less) directly with B4A. You only need an empty .jar file and a DependsOn annotation that includes your aar. My latest libraries are good examples. The DesignSupport library has just an empty .jar file. All the code is in the .aar.

It would be fantastic if I can use aar as my library without having to switch to Eclipse / Android Studio (don't know what means adding support for creating wrappers directly in aar).

Using a third party aar library directly won't be possible. You will always need a wraper. Though it is possible to create the wrapper in AndroidStudio as an .aar. Currently you only need an empty "dummy" .jar file. This might change in the future.
 
Upvote 0

MMORETTI964

Member
Licensed User
Longtime User
I will try it, corwin, thanks, I didn't know the "empty .jar" feature, so I need only the empty jar + launching JavaDoc, true?

But we will try before one time more to CreateEvent even if, this class need (as init) an implementation to abstract class so I don't know if I can pass it as Object.
It's the same problem MarcoRome had in this thread https://www.b4x.com/android/forum/threads/javaobject-aar-call.73634/#post-467689 (and the same library! :D).

Marco, has you reached the goal to get callbacks directly in B4A from AAR coges library?

Thank you all for your patience. o_O
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
I will try it, corwin, thanks, I didn't know the "empty .jar" feature, so I need only the empty jar + launching JavaDoc, true?

But we will try before one time more to CreateEvent even if, this class need (as init) an implementation to abstract class so I don't know if I can pass it as Object.
It's the same problem MarcoRome had in this thread https://www.b4x.com/android/forum/threads/javaobject-aar-call.73634/#post-467689 (and the same library! :D).

Marco, has you reached the goal to get callbacks directly in B4A from AAR coges library?

Thank you all for your patience. o_O
Sorry only now i see your question.
No nothing yet
 
Upvote 0
Top