23 lines
593 B
Kotlin
23 lines
593 B
Kotlin
package com.lagradost.cloudstream3.utils
|
|
|
|
/*
|
|
import android.content.Context
|
|
import dalvik.system.PathClassLoader
|
|
import java.io.File
|
|
open class TestSource {
|
|
open fun doMath(): Int {
|
|
return 33
|
|
}
|
|
}
|
|
object ExtensionManager {
|
|
fun getSourceFromDex(context: Context, pkgName: String, file: File): TestSource? {
|
|
val loader = PathClassLoader(file.absolutePath, context.classLoader)
|
|
|
|
val obj = Class.forName(pkgName, false, loader).newInstance()
|
|
if (obj is TestSource) {
|
|
println("MATH : ${obj.doMath()}")
|
|
}
|
|
|
|
return null
|
|
}
|
|
}*/ |