diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 85bca3c93..90f01213b 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -1,12 +1,19 @@ package io.legado.app import android.app.Application +import android.content.SharedPreferences class App : Application() { - + companion object{ + lateinit var instance:App + lateinit var configPreferences:SharedPreferences + } override fun onCreate() { super.onCreate() + instance = this + configPreferences = getSharedPreferences("CONFIG", 0) + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt new file mode 100644 index 000000000..6f9e7b6b9 --- /dev/null +++ b/app/src/main/java/io/legado/app/constant/AppConst.kt @@ -0,0 +1,7 @@ +package io.legado.app.constant + +object AppConst { + const val channelIdDownload = "channel_download" + const val channelIdReadAloud = "channel_read_aloud" + const val channelIdWeb = "channel_web" +} \ No newline at end of file