diff --git a/receivers/android/app/src/main/ic_launcher-playstore.png b/receivers/android/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..e8ee88b Binary files /dev/null and b/receivers/android/app/src/main/ic_launcher-playstore.png differ diff --git a/receivers/android/app/src/main/java/com/futo/fcast/receiver/PlayerActivity.kt b/receivers/android/app/src/main/java/com/futo/fcast/receiver/PlayerActivity.kt index e9c6f46..950474e 100644 --- a/receivers/android/app/src/main/java/com/futo/fcast/receiver/PlayerActivity.kt +++ b/receivers/android/app/src/main/java/com/futo/fcast/receiver/PlayerActivity.kt @@ -2,9 +2,11 @@ package com.futo.fcast.receiver import android.content.Context import android.net.* +import android.os.Build import android.os.Bundle import android.util.Log import android.view.Window +import android.view.WindowInsets import android.view.WindowManager import androidx.appcompat.app.AppCompatActivity import com.google.android.exoplayer2.* @@ -102,6 +104,7 @@ class PlayerActivity : AppCompatActivity() { Log.i(TAG, "onCreate") setContentView(R.layout.activity_player) + setFullScreen() _playerControlView = findViewById(R.id.player_control_view) _scope = CoroutineScope(Dispatchers.Main) @@ -140,6 +143,25 @@ class PlayerActivity : AppCompatActivity() { TcpListenerService.activityCount++ } + override fun onWindowFocusChanged(hasFocus: Boolean) { + super.onWindowFocusChanged(hasFocus) + if (hasFocus) setFullScreen() + } + + private fun setFullScreen() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + window.insetsController?.hide(WindowInsets.Type.statusBars()) + window.insetsController?.hide(WindowInsets.Type.navigationBars()) + window.insetsController?.hide(WindowInsets.Type.systemBars()) + } else { + @Suppress("DEPRECATION") + window.setFlags( + WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN + ) + } + } + override fun onPause() { super.onPause() diff --git a/receivers/android/app/src/main/java/com/futo/fcast/receiver/TcpListenerService.kt b/receivers/android/app/src/main/java/com/futo/fcast/receiver/TcpListenerService.kt index d07e559..8bb4bb0 100644 --- a/receivers/android/app/src/main/java/com/futo/fcast/receiver/TcpListenerService.kt +++ b/receivers/android/app/src/main/java/com/futo/fcast/receiver/TcpListenerService.kt @@ -44,7 +44,7 @@ class TcpListenerService : Service() { val notification: Notification = NotificationCompat.Builder(this, CHANNEL_ID) .setContentTitle("TCP Listener Service") .setContentText("Listening on port $PORT") - .setSmallIcon(R.drawable.ic_launcher_background) + .setSmallIcon(R.mipmap.ic_launcher) .build() startForeground(NOTIFICATION_ID, notification) diff --git a/receivers/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/receivers/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 2b068d1..0000000 --- a/receivers/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/receivers/android/app/src/main/res/drawable/ic_launcher_background.xml b/receivers/android/app/src/main/res/drawable/ic_launcher_background.xml index 07d5da9..410fc4c 100644 --- a/receivers/android/app/src/main/res/drawable/ic_launcher_background.xml +++ b/receivers/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,170 +1,14 @@ - + android:viewportWidth="97" + android:viewportHeight="97"> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M0,0h97v97h-97z" + android:fillColor="#D9D9D9"/> + diff --git a/receivers/android/app/src/main/res/drawable/ic_launcher_foreground.xml b/receivers/android/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..4f867c2 --- /dev/null +++ b/receivers/android/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index eca70cf..bbd3e02 100644 --- a/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index eca70cf..bbd3e02 100644 --- a/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/receivers/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/receivers/android/app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml b/receivers/android/app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml deleted file mode 100644 index 6f3b755..0000000 --- a/receivers/android/app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..7c32641 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index c209e78..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..f1a0491 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index b2dfe3d..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..2b59c79 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 4f0f1d6..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..aa2d84f Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp deleted file mode 100644 index 62b611d..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..2917e7e Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 948a307..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..2f06719 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 1b9a695..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..182bef0 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp deleted file mode 100644 index 28d4b77..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..56375e7 Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9287f50..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..35ce2df Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp deleted file mode 100644 index aa7d642..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ diff --git a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..2967d9e Binary files /dev/null and b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9126ae3..0000000 Binary files a/receivers/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ