Semi-Functional -- Work in Progress
Simplified abstraction layer around Onyx SDK for Android to help encourage more development for my beloved Onyx Boox Note Air 3
cd <yourproject>
git clone [email protected]:aarontharris/atonyx.git
git submodule update --init
Required Repos
dependencyResolutionManagement {
repositories {
maven { setUrl("https://repo.boox.com/repository/maven-public/") }
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
}
}
Include atonyx
include(":atonyx")
android {
defaultConfig {
ndk { abiFilters.add("armeabi-v7a") }
}
packaging {
jniLibs {
pickFirsts.add("lib/*/libc++_shared.so")
}
}
}
I had to add the following due to some api conflict.
android.enableJetifier=true
A custom Application class must be added to AndroidManifest. Also, the following must be executed within the Custom Application.
override fun onCreate() {
super.onCreate()
AtOnyxApp.onCreate(this)
}
// Psuedo Code
class MyActivity : AppCompatActivity {
private val onx = AtOnyx()
private lateinit var surfaceview : SurfaceView // from your layout
fun onCreate( savedInstanceState : Bundle ) {
super.onCreate(savedInstanceState)
onx.doCreate(surfaceview)
}
fun onResume() {
super.onResume()
onx.doResume()
}
fun onPause() {
super.onPause()
onx.doPause()
}
fun onDestroy() {
super.onDestroy()
onx.doDestroy()
}
}