33 lines
1.0 KiB
Kotlin
33 lines
1.0 KiB
Kotlin
package com.navinfo.omqs
|
|
|
|
import android.app.Application
|
|
import android.util.Log
|
|
import com.navinfo.omqs.db.MyRealmModule
|
|
import com.navinfo.omqs.tools.FileManager
|
|
import com.navinfo.omqs.ui.manager.TakePhotoManager
|
|
import com.navinfo.omqs.util.NetUtils
|
|
import dagger.hilt.android.HiltAndroidApp
|
|
import org.videolan.vlc.Util
|
|
import io.realm.Realm
|
|
import io.realm.RealmConfiguration
|
|
import java.io.File
|
|
import java.security.MessageDigest
|
|
|
|
@HiltAndroidApp
|
|
class OMQSApplication : Application() {
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
FileManager.initRootDir(this)
|
|
Util.getInstance().init(applicationContext)
|
|
NetUtils.getInstance().init(this)
|
|
TakePhotoManager.getInstance().init(this, 1)
|
|
FileManager.initRootDir(this)
|
|
}
|
|
|
|
private fun getKey(inputString: String): String {
|
|
val messageDigest = MessageDigest.getInstance("SHA-256")
|
|
val hashBytes = messageDigest.digest(inputString.toByteArray())
|
|
return hashBytes.joinToString("") { "%02x".format(it) };
|
|
}
|
|
|
|
} |