feat(CON-223) : Ajouter l'auth
feat(CON-262) : Aligner les flux avec les nouveaux dev back
This commit is contained in:
@ -72,6 +72,10 @@ android {
|
||||
dimension = "version"
|
||||
}
|
||||
|
||||
create("dev") {
|
||||
dimension = "version"
|
||||
}
|
||||
|
||||
create("demo") {
|
||||
dimension = "version"
|
||||
}
|
||||
|
@ -14,7 +14,9 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import fr.openium.consentium.R
|
||||
import fr.openium.consentium.api.Consentium
|
||||
import fr.openium.consentium.api.state.FetchConsentiumState
|
||||
|
||||
@ -25,14 +27,17 @@ fun SplashScreen(
|
||||
) {
|
||||
// Property
|
||||
val context = LocalContext.current
|
||||
val consentium = remember { Consentium(context = context, applicationId = "DemoApplicationId") }
|
||||
val consentiumKey = stringResource(R.string.consentium_api_key)
|
||||
val consentium = remember { Consentium(context = context, applicationId = consentiumKey) }
|
||||
|
||||
// Effect
|
||||
LaunchedEffect(Unit) {
|
||||
consentium.fetchConsentState.collect { consentState ->
|
||||
when (consentState) {
|
||||
FetchConsentiumState.Idle,
|
||||
FetchConsentiumState.Loading -> {}
|
||||
FetchConsentiumState.Loading,
|
||||
-> {
|
||||
}
|
||||
|
||||
FetchConsentiumState.Error -> {
|
||||
// Handle error
|
||||
|
@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Consentium</string>
|
||||
<string translatable="false" name="consentium_api_key">01938ce4-331a-7592-9e90-f09201ff4f36</string>
|
||||
</resources>
|
Reference in New Issue
Block a user