-
Notifications
You must be signed in to change notification settings - Fork 13
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
129 changed files
with
1,768 additions
and
1,035 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package city.zouitel.logic | ||
|
||
import android.content.Context | ||
import android.media.AudioManager | ||
|
||
context (Context) | ||
infix fun Boolean.makeSoundFor(audioManager: Int) { | ||
val systemService = this@Context.getSystemService(Context.AUDIO_SERVICE) as AudioManager | ||
|
||
if (this) systemService.playSoundEffect(audioManager, 1.0f) | ||
} |
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
10 changes: 4 additions & 6 deletions
10
core/database/src/main/java/city/zouitel/database/Encryption.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
21 changes: 21 additions & 0 deletions
21
core/database/src/main/java/city/zouitel/database/dao/AudioDao.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,21 @@ | ||
package city.zouitel.database.dao | ||
|
||
import androidx.room.Dao | ||
import androidx.room.Delete | ||
import androidx.room.Insert | ||
import androidx.room.OnConflictStrategy | ||
import androidx.room.Query | ||
import city.zouitel.database.model.AudioEntity | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
@Dao | ||
interface AudioDao { | ||
|
||
@Query("SELECT * FROM AUDIOS_TABLE") | ||
fun getAllAudios(): Flow<List<AudioEntity>> | ||
@Insert(onConflict = OnConflictStrategy.REPLACE) | ||
suspend fun addAudio(audioEntity: AudioEntity) | ||
|
||
@Delete | ||
suspend fun deleteAudio(audioEntity: AudioEntity) | ||
} |
Oops, something went wrong.