Cannot Access System Control Manager

Hello,

We are creating an application like Video Player app of khadas but unlike the default video player app we are not able to give the 3D mode to our user as we are not able to access the SystemControlManager Class. When we access the SystemControlManager class we are getting the following error.

java.lang.UnsatisfiedLinkError: dlopen failed: library “vendor.amlogic.hardware.systemcontrol@1.0.so” not found

Can you please provide a solution?

you need to describe your problem clearly. your app is developed with Android studio?

Yes our app is developed in android studios.

The problem that we are facing is we are not able to switch to 3D Left Right Mode like the Native Video Player application dose for khadas.

How is your app called vendor.amlogic.hardware.systemcontrol@1.0.so ? you can describe it in detail

We are using the following syntax to load the SystemControl.so
static {
System.loadLibrary(“systemcontrol_jni”);
}

Do we need to put systemcontrol_jni in our project or khadas will automatically fetch the same for us?

you should create libs/armeabi-v7a/ in your app project,put systemcontrol_jni so to armeabi-v7a

When loading systemcontrol_jni from libs/armeabi-v7a/ we are getting the following error

JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn’t find class “com.droidlogic.app.SystemControlManager” on path: DexPathList[[zip file “/data/app/com.video.democpp-fXnPhtKaq-CORSqsX_v2iw==/base.apk”],nativeLibraryDirectories=[/data/app/com.saras3d.democpp-fXnPhtKaq-CORSqsX_v2iw==/lib/arm, /system/lib, /product/lib]]

you should call the systemcontrol_jni by droidlogic jar ,SystemControlManager.java is the class of droidlogic.jar

We have imported droidlogic.jar in our application and tried calling the SysteControlManager manager but still we are facing the issue where it is showing the following error

2022-01-05 15:39:53.633 11802-11802/com.demo.droidlogic E/systemcontrol-jni: Native registration unable to find class ‘com/droidlogic/app/SystemControlManager’
2022-01-05 15:39:53.633 11802-11802/com.demo.droidlogic E/systemcontrol-jni: Can’t register DtvkitGlueClient
2022-01-05 15:39:53.826 11802-11802/com.demo.droidlogic A/as3d.droidlogi: java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn’t find class “com.droidlogic.app.SystemControlManager” on path: DexPathList[[zip file “/data/app/com.demo.droidlogic-G0rEmBzgj_GdQUUdrX1aRw==/base.apk”],nativeLibraryDirectories=[/data/app/com.demo.droidlogic-G0rEmBzgj_GdQUUdrX1aRw==/lib/arm, /system/lib, /product/lib]]

@jasonl how to integrate droidlogic.jar into our application, we are struggling to do the same.
The droidlogic.jar is containing the classes.dex which causing the issue when the gradle is trying to build the application.

i have not integrated droidlogic.jar to a android studio app project ,but i think you try to build your app by Android.mk,and run the app on board,maybe on android studio ,some dependent library can not access when use droidlogic.jar

@jasonl : I removed the default videoplayer system app and installed it as a normal app still it was able to access the SystemControlManager class.

@jasonl : As you suggested we have created our project using Android.mk file and now we are able to access the SystemControlManager class but the problem is the when we call the setMode method it is returning 0 but the output device is not turning to left Right sequential mode when we call 3dlr in setmode can you please suggest