Skip to content

Commit

Permalink
Android6への対応
Browse files Browse the repository at this point in the history
  • Loading branch information
t-yoshi committed Apr 2, 2024
1 parent 3a29eda commit 8c4b2e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.18" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath 'com.google.gms:google-services:4.3.15' classpath 'com.android.tools.build:bundletool:0.9.0' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } }}task clean(type: Delete) { delete rootProject.buildDir}ext { version_code = 4_01_10_00 version_name = "4.1.10-0" yt_version = "YT50a" target_sdk_version = 34 min_sdk_version = 23 kotlinx_coroutines_version = "1.6.0" serialization_version = "1.3.1" ktor_client_version = "1.6.5" libpeercast_version = "4.1.0" androidx_compat_version = "1.6.1" androidx_core_version = "1.10.1" androidx_preference_ktx_version = "1.2.1" leanback_version = "1.2.0-alpha02" android_material_version = "1.11.0-alpha02" lifecycle_version = "2.6.1" koin_version = '3.1.6' work_version = "2.8.1" timber_version = "5.0.1" ndkVersion = '25.1.8937393'}
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.18" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath 'com.google.gms:google-services:4.4.1' classpath 'com.android.tools.build:bundletool:0.9.0' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } }}task clean(type: Delete) { delete rootProject.buildDir}ext { version_code = 4_01_10_00 version_name = "4.1.10-0" yt_version = "YT50a" target_sdk_version = 34 min_sdk_version = 23 kotlinx_coroutines_version = "1.6.0" serialization_version = "1.3.1" ktor_client_version = "1.6.5" libpeercast_version = "4.1.0" androidx_compat_version = "1.6.1" androidx_core_version = "1.10.1" androidx_preference_ktx_version = "1.2.1" leanback_version = "1.2.0-alpha02" android_material_version = "1.11.0-alpha02" lifecycle_version = "2.6.1" koin_version = '3.1.6' work_version = "2.8.1" timber_version = "5.0.1" ndkVersion = '25.1.8937393'}
Expand Down
5 changes: 3 additions & 2 deletions core/src/main/java/org/peercast/core/PeerCastService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import android.os.*
import android.widget.Toast
import androidx.annotation.BinderThread
import androidx.annotation.MainThread
import androidx.core.content.ContextCompat
import androidx.lifecycle.LifecycleService
import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -56,11 +57,11 @@ class PeerCastService : LifecycleService() {
nativeStart(filesDir.absolutePath)
notificationHelper = NotificationHelper(this)

registerReceiver(commandReceiver, IntentFilter().also {
ContextCompat.registerReceiver(this, commandReceiver, IntentFilter().also {
it.addAction(ACTION_BUMP_CHANNEL)
it.addAction(ACTION_STOP_CHANNEL)
it.addAction(ACTION_CLEAR_CACHE)
}, RECEIVER_NOT_EXPORTED)
}, ContextCompat.RECEIVER_NOT_EXPORTED)

connMan = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
connMan.registerNetworkCallback(MiniUpnpManager.REQ_TYPE_WIFI_ETHERNET, networkCallback)
Expand Down

0 comments on commit 8c4b2e9

Please sign in to comment.