Created
August 23, 2021 10:43
-
-
Save manuelvicnt/337b774d6dce914634cb352c69b1b8fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class PlayActivityContainer(val context: Context) { | |
fun provideMusicDatabase(): MusicDatabase { | |
return Room.databaseBuilder( | |
context, MusicDatabase::class.java, "music.db" | |
).build() | |
} | |
fun provideMusicPlayer() = MusicPlayer( | |
provideMusicDatabase() | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment