I'm trying to test the integration of AR (Augmented Reality) plugins (a lot). One of this plugins is Vuforia, with others Outsystems does not include the plugin in the output apk, or includes the plugin but no the library required. Really, Outsystems fails to integrate a lot of plugins.
Back to Vuforia: when start running the new screen for the AR experience, it almost block the device. The problem in this case is the library: The library libVuforia.so could not be loaded.
With others AR plugins, the error reported in Android logs is real, because Outsystems does not includes the library. In this case, the generated apk by Outsystems includes the library.
Plugin used: https://github.com/mattrayner/cordova-plugin-vuforia
Someone knows why Outsystems fails findind the library? It must be placed on other folder? It must include some especial configuration on plugin.xml?
Now i will trying to reproduce the bug creating a real cordova aplication only including de plugin and a button to launch the AR experience to compare the outputs (APK, logs). The examples of Vuforia works and includes the library on the same place.
Hi Cristian,
I take it you have followed the steps laid out here, and taken this master class on how to integrate Cordova plugins?
more detailed steps of my test:1) in order to evaluate OutSystems + Augmented reality, i need to integrate them as a cordova plugIn. i have an app with the UI and app with plugin actions and this config in the extensibility configurations:{ "plugin" : { "url": "https://github.com/mattrayner/cordova-plugin-vuforia.git" }}2) the module include this code to launch the AR: 3) building and installing the apk works, the app start without problems:4) this button works: first step on native code and ask the user to allow access to the camera. 5) if the user allows the access to the camera, the activity to display the camera start and the Vuforia sdk try to load. THIS is the step that don't work because the library cannot be found running the APK generated by Outsystems. Remember, the library (libVuforia.so) was included in the APK (folder lib). The app 'hangs' because is consuming a lot of processing power doing a loop trying to update the screen.
6) extract of the log (android native). The last line shows the error.07-30 16:23:58.323 29501 29501 D ImageTargets: MRAY :: VUFORIA RECEIVED FILE: PluginTest.xml07-30 16:23:58.323 29501 29501 D ImageTargets: MRAY :: VUTORIA TARGETS: ["logo","iceland","canterbury-grass","brick-lane"]07-30 16:23:58.323 29501 29501 D ImageTargets: MRAY :: OVERLAY MESSAGE: Point your camera at a test image...07-30 16:23:58.329 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.330 1429 8999 I SensorService: createSensorEventConnection package name android.view.OrientationEventListener07-30 16:23:58.331 1429 8999 D SensorService: Calling batch handle==27 flags=0 rate=200000000 timeout== 007-30 16:23:58.331 681 681 I sensors-hal: batch:187, android.sensor.accelerometer/27, period=200000000, max_latency=007-30 16:23:58.331 681 681 I sensors-hal: batch:196, android.sensor.accelerometer/27, period=200000000, max_latency=0 request completed07-30 16:23:58.332 681 681 I sensors-hal: activate:121, activate handle 2707-30 16:23:58.332 681 681 I sensors-hal: activate:126, android.sensor.accelerometer/27 en=107-30 16:23:58.332 681 681 I sensors-hal: worker:39, this = 0x796c049b5007-30 16:23:58.332 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 1429 15421 V WindowManager: Relayout Window{96c62b0 u0 com.samsung.android.app.cocktailbarservice/com.samsung.android.app.cocktailbarservice.CocktailBarService}: viewVisibility=8 req=67x325 WM.LayoutParams{(0,813)(67x325) gr=#35 sim=#20 ty=2226 fl=#1800148 pfl=0x50 fmt=-2 vsysui=0x2000 colorMode=0 naviIconColor=0}07-30 16:23:58.334 1840 1840 I chatty : uid=10002(u0_a2) com.android.systemui identical 15 lines07-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 1429 1480 D ViewRootImpl@38779d8[ChangeRatioButtonWindow]: Relayout returned: old=[0,0][0,0] new=[1440,0][2768,1440] result=0x27 surface={valid=true 481753657344} changed=true07-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 1840 1840 I chatty : uid=10002(u0_a2) com.android.systemui identical 5 lines07-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 1429 1810 I OpenGLRenderer: Initialized EGL, version 1.407-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 1840 1840 I chatty : uid=10002(u0_a2) com.android.systemui identical 1 line07-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.334 681 681 I sensors-hal: activate:137, android.sensor.accelerometer/27 en=1 completed07-30 16:23:58.334 1429 1810 D OpenGLRenderer: Swap behavior 207-30 16:23:58.334 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.335 1840 1840 I chatty : uid=10002(u0_a2) com.android.systemui identical 56 lines07-30 16:23:58.335 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.336 3867 3867 D ViewRootImpl@691b3a9[CocktailBarService]: Relayout returned: old=[2893,813][2960,1138] new=[2893,813][2960,1138] result=0x1 surface={valid=false 0} changed=false07-30 16:23:58.336 29501 29501 D SensorManager: registerListener :: 27, LSM6DSL Accelerometer, 200000, 0,07-30 16:23:58.336 1429 2149 V WindowManager: rotationForOrientationLw(orient=10, last=1); user=0 sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false07-30 16:23:58.337 29501 29501 I Vuforia_Application: Activity is in LANDSCAPE07-30 16:23:58.339 1840 1840 V Configuration: needToUpdateOverlays07-30 16:23:58.341 29501 29501 D ImageTargets: onStart07-30 16:23:58.343 29501 29501 D ImageTargets: onResume07-30 16:23:58.343 29501 29536 W System.err: The library libVuforia.so could not be loaded7) the library on the apk:
I need some advanced help here. The basics covered by the mobile certification, master class and webinars are working here (integrating an external cordova plugin, detecting their prescence from javascript, calling the exposed methods from javascript).- APKs generated by outsystems have more logs? I'm trying to get more information using adb logcat, debugging with chrome, including manually some messages to the console and the plugin.i will try to debug attached to the process with Android Studio in the hope to get some useful information without having the code of outsystems app to do a step by step debugging.
Hello Cristian,
I see no mention to the SDK despite being listed as a dependency. Are you including it?
Also, can you share a complete OML/OAP without any personal information so we can take a look as well?
Thanks,
Armando
the sdk dependency is resolved in plugin.xml
<dependency id="cordova-plugin-vuforia-sdk" version="6.x.x" />
Hi Cristian, I'm facing the same issue with my application: The library "libVuforia.so" could not be loadedDid you manage to solve this out?
Cheers,VS