This commit is contained in:
kunfei 2023-12-07 16:04:53 +08:00
parent bf298b0474
commit 4ff9f758f8
5 changed files with 9 additions and 5 deletions

View File

@ -42,7 +42,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.legado.app" applicationId "io.legado.app"
minSdk 21 minSdk 21
targetSdk 33 targetSdk 34
versionCode 10000 + gitCommits versionCode 10000 + gitCommits
versionName version versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -200,7 +200,7 @@ dependencies {
androidTestImplementation("androidx.room:room-testing:$room_version") androidTestImplementation("androidx.room:room-testing:$room_version")
//liveEventBus //liveEventBus
implementation('io.github.jeremyliao:live-event-bus-x:1.8.0') implementation('com.github.michaellee123:LiveEventBus:1.8.14')
// //
implementation('org.jsoup:jsoup:1.16.2') implementation('org.jsoup:jsoup:1.16.2')

View File

@ -17,6 +17,8 @@
tools:ignore="ScopedStorage" /> tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<application <application
android:name=".App" android:name=".App"
@ -422,12 +424,13 @@
android:foregroundServiceType="dataSync" /> android:foregroundServiceType="dataSync" />
<service <service
android:name=".service.WebService" android:name=".service.WebService"
android:foregroundServiceType="connectedDevice" /> android:foregroundServiceType="dataSync" />
<service <service
android:name=".service.WebTileService" android:name=".service.WebTileService"
android:exported="true" android:exported="true"
android:icon="@drawable/ic_web_service_noti" android:icon="@drawable/ic_web_service_noti"
android:label="legado Web Service" android:label="legado Web Service"
android:foregroundServiceType="dataSync"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter> <intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" /> <action android:name="android.service.quicksettings.action.QS_TILE" />

View File

@ -50,10 +50,10 @@ class App : Application() {
//预下载Cronet so //预下载Cronet so
Cronet.preDownload() Cronet.preDownload()
createNotificationChannels() createNotificationChannels()
applyDayNight(this)
LiveEventBus.config() LiveEventBus.config()
.lifecycleObserverAlwaysActive(true) .lifecycleObserverAlwaysActive(true)
.autoClear(false) .autoClear(false)
applyDayNight(this)
registerActivityLifecycleCallbacks(LifecycleHelp) registerActivityLifecycleCallbacks(LifecycleHelp)
defaultSharedPreferences.registerOnSharedPreferenceChangeListener(AppConfig) defaultSharedPreferences.registerOnSharedPreferenceChangeListener(AppConfig)
DefaultData.upVersion() DefaultData.upVersion()

View File

@ -16,6 +16,7 @@ object IntentHelp {
fun getBrowserIntent(uri: Uri): Intent { fun getBrowserIntent(uri: Uri): Intent {
val intent = Intent(Intent.ACTION_VIEW) val intent = Intent(Intent.ACTION_VIEW)
intent.`package` = appCtx.packageName
intent.data = uri intent.data = uri
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
if (intent.resolveActivity(appCtx.packageManager) == null) { if (intent.resolveActivity(appCtx.packageManager) == null) {

View File

@ -6,7 +6,7 @@ buildscript {
build_tool_version = '34.0.0' build_tool_version = '34.0.0'
kotlin_version = '1.9.20' kotlin_version = '1.9.20'
ksp_version = "1.0.13" ksp_version = "1.0.13"
agp_version = '8.1.4' agp_version = '8.2.0'
media3_version = "1.2.0" media3_version = "1.2.0"
splitties_version = '3.0.0' splitties_version = '3.0.0'
room_version = '2.6.1' room_version = '2.6.1'