Skip to content

Commit

Permalink
chore(*): upgrade dependencies (StreamPack 2.6.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Feb 16, 2024
1 parent ab5f45d commit 81b0b9d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ plugins {

android {
namespace 'io.github.thibaultbee.streampack.example'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "io.github.thibaultbee.streampack.example"
minSdk 26
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"

Expand All @@ -31,7 +31,9 @@ android {
jvmTarget = '1.8'
}
packagingOptions {
pickFirst '**/*.so'
jniLibs {
pickFirsts += ['**/*.so']
}
}
buildFeatures {
viewBinding true
Expand All @@ -40,17 +42,17 @@ android {

dependencies {

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation "io.github.thibaultbee:streampack:${streampackVersion}"
// Only needed for RTMP live streaming
implementation "io.github.thibaultbee:streampack-extension-rtmp:${streampackVersion}"
// Only needed for SRT live streaming
implementation "io.github.thibaultbee:streampack-extension-srt:${streampackVersion}"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<!-- For play store -->
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />

<!-- Required permissions -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Use internally. Not use with camera but it avoid a warning -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import io.github.thibaultbee.streampack.listeners.OnConnectionListener
import io.github.thibaultbee.streampack.listeners.OnErrorListener
import io.github.thibaultbee.streampack.streamers.StreamerLifeCycleObserver
import io.github.thibaultbee.streampack.streamers.helpers.CameraStreamerConfigurationHelper
import io.github.thibaultbee.streampack.utils.TAG
import kotlinx.coroutines.launch

class MainActivity : AppCompatActivity() {
Expand Down Expand Up @@ -125,8 +124,10 @@ class MainActivity : AppCompatActivity() {
}
}
} else {
streamer.stopStream()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
lifecycleScope.launch {
streamer.stopStream()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
}
}
}
Expand Down Expand Up @@ -185,4 +186,8 @@ class MainActivity : AppCompatActivity() {
private fun toast(message: String) {
runOnUiThread { applicationContext.toast(message) }
}

companion object {
private const val TAG = "MainActivity"
}
}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
buildscript {
ext {
// Upgrade StreamPack version here
streampackVersion = '2.5.2'
streampackVersion = '2.6.0'
}
}

plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Mar 26 13:16:11 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 81b0b9d

Please sign in to comment.