3

I have a Native Android Application that is developed using Java. I'm creating a e-learning application. Hence, i wanted to add Moodle(Moodle is an Opensource learning tool) to it.

However, the 'Moodle' for mobile is not in Not a native app. Rather it is implemented using Cordova framework. Here is the URL of the Moodle cordova project https://github.com/moodlehq/moodlemobile2 on github.

My question is, is there a way to convert this Moodle code to an Android library(Module)/ AAR file and add that library to my Native Android application?

Please note that i have gone through multiple questions on Stackoverflow which tells how to use a AAR File in Cordova project. But my requirement is to convert the Cordova project to a Library or AAR file and then import it into my Native Android application. Is there a way to achieve this?

Zax
  • 2,870
  • 7
  • 52
  • 76
  • AAR is similar to a JAR or WAR in the sense that it contains Java bytecode or `.class` files to be included on the classpath dependencies during compile time. Since cordova output binaries are primarily containing html, css and javascript with wrappers (native implementations) in an APK, I guess the only way to include it is to have the wrappers included as libraries and find means of triggering the wrappers to load the web files. However this could be difficult if the wrappers were never meant to be loaded as libraries and also would need a lot of compatibility/wrapping layer to be added. – ahasbini Apr 22 '19 at 11:04

0 Answers0