-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
150 changed files
with
3,171 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
android/app/src/main/java/com/ohdodok/catchytape/mediacontrol/PlaybackService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.ohdodok.catchytape.mediacontrol | ||
|
||
import androidx.media3.exoplayer.ExoPlayer | ||
import androidx.media3.session.MediaSession | ||
import androidx.media3.session.MediaSessionService | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import javax.inject.Inject | ||
|
||
@AndroidEntryPoint | ||
class PlaybackService : MediaSessionService() { | ||
|
||
private var mediaSession: MediaSession? = null | ||
@Inject lateinit var player: ExoPlayer | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
mediaSession = MediaSession.Builder(this, player).build() | ||
} | ||
|
||
override fun onDestroy() { | ||
mediaSession?.run { | ||
player.release() | ||
release() | ||
mediaSession = null | ||
} | ||
super.onDestroy() | ||
} | ||
|
||
override fun onGetSession( | ||
controllerInfo: MediaSession.ControllerInfo | ||
): MediaSession? = mediaSession | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/on_surface" | ||
android:pathData="M12,2C10.939,2 9.922,2.421 9.172,3.172C8.421,3.922 8,4.939 8,6C8,7.061 8.421,8.078 9.172,8.828C9.922,9.579 10.939,10 12,10C13.061,10 14.078,9.579 14.828,8.828C15.579,8.078 16,7.061 16,6C16,4.939 15.579,3.922 14.828,3.172C14.078,2.421 13.061,2 12,2ZM10,6C10,5.47 10.211,4.961 10.586,4.586C10.961,4.211 11.47,4 12,4C12.53,4 13.039,4.211 13.414,4.586C13.789,4.961 14,5.47 14,6C14,6.53 13.789,7.039 13.414,7.414C13.039,7.789 12.53,8 12,8C11.47,8 10.961,7.789 10.586,7.414C10.211,7.039 10,6.53 10,6ZM17,12H7C6.204,12 5.441,12.316 4.879,12.879C4.316,13.441 4,14.204 4,15C4,17.232 4.918,19.02 6.424,20.23C7.906,21.42 9.894,22 12,22C14.106,22 16.094,21.42 17.576,20.23C19.08,19.02 20,17.232 20,15C20,14.204 19.684,13.441 19.121,12.879C18.559,12.316 17.796,12 17,12ZM7,14H17C17.265,14 17.52,14.105 17.707,14.293C17.895,14.48 18,14.735 18,15C18,16.634 17.35,17.846 16.324,18.67C15.272,19.514 13.76,20 12,20C10.24,20 8.728,19.514 7.676,18.67C6.65,17.846 6,16.634 6,15C6,14.735 6.105,14.48 6.293,14.293C6.48,14.105 6.735,14 7,14Z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/on_surface" | ||
android:pathData="M12,2C10.939,2 9.922,2.421 9.172,3.172C8.421,3.922 8,4.939 8,6C8,7.061 8.421,8.078 9.172,8.828C9.922,9.579 10.939,10 12,10C13.061,10 14.078,9.579 14.828,8.828C15.579,8.078 16,7.061 16,6C16,4.939 15.579,3.922 14.828,3.172C14.078,2.421 13.061,2 12,2ZM17,12H7C6.204,12 5.441,12.316 4.879,12.879C4.316,13.441 4,14.204 4,15C4,17.232 4.918,19.02 6.424,20.23C7.906,21.42 9.894,22 12,22C14.106,22 16.094,21.42 17.576,20.23C19.08,19.02 20,17.232 20,15C20,14.204 19.684,13.441 19.121,12.879C18.559,12.316 17.796,12 17,12Z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/on_surface" | ||
android:pathData="M3,6C3,5.801 3.079,5.61 3.22,5.47C3.36,5.329 3.551,5.25 3.75,5.25H20.25C20.449,5.25 20.64,5.329 20.78,5.47C20.921,5.61 21,5.801 21,6C21,6.199 20.921,6.39 20.78,6.53C20.64,6.671 20.449,6.75 20.25,6.75H3.75C3.551,6.75 3.36,6.671 3.22,6.53C3.079,6.39 3,6.199 3,6ZM3.75,12.75H15C15.199,12.75 15.39,12.671 15.53,12.53C15.671,12.39 15.75,12.199 15.75,12C15.75,11.801 15.671,11.61 15.53,11.47C15.39,11.329 15.199,11.25 15,11.25H3.75C3.551,11.25 3.36,11.329 3.22,11.47C3.079,11.61 3,11.801 3,12C3,12.199 3.079,12.39 3.22,12.53C3.36,12.671 3.551,12.75 3.75,12.75ZM10.5,17.25H3.75C3.551,17.25 3.36,17.329 3.22,17.47C3.079,17.61 3,17.801 3,18C3,18.199 3.079,18.39 3.22,18.53C3.36,18.671 3.551,18.75 3.75,18.75H10.5C10.699,18.75 10.89,18.671 11.03,18.53C11.171,18.39 11.25,18.199 11.25,18C11.25,17.801 11.171,17.61 11.03,17.47C10.89,17.329 10.699,17.25 10.5,17.25ZM22.716,10.907L18.966,9.782C18.854,9.748 18.735,9.741 18.62,9.762C18.505,9.782 18.396,9.829 18.302,9.898C18.209,9.968 18.132,10.059 18.08,10.163C18.027,10.268 18,10.383 18,10.5V15.404C17.428,15.074 16.763,14.942 16.108,15.028C15.453,15.114 14.845,15.414 14.378,15.881C13.911,16.348 13.612,16.956 13.526,17.611C13.439,18.266 13.572,18.931 13.903,19.503C14.233,20.075 14.743,20.522 15.353,20.774C15.964,21.027 16.64,21.071 17.278,20.899C17.916,20.728 18.479,20.351 18.881,19.827C19.283,19.303 19.5,18.66 19.5,18V11.508L22.284,12.343C22.379,12.374 22.48,12.386 22.579,12.377C22.679,12.369 22.776,12.341 22.864,12.295C22.953,12.248 23.031,12.185 23.095,12.108C23.159,12.03 23.206,11.941 23.235,11.846C23.264,11.75 23.273,11.649 23.262,11.55C23.252,11.451 23.221,11.354 23.173,11.267C23.125,11.179 23.059,11.103 22.981,11.041C22.902,10.979 22.812,10.933 22.716,10.907Z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:drawable="@drawable/ic_my_page_filled" android:state_selected="true" /> | ||
<item android:drawable="@drawable/ic_my_page" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:drawable="@drawable/ic_playlist_filled" android:state_selected="true" /> | ||
<item android:drawable="@drawable/ic_playlist" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.