Skip to content

Commit

Permalink
disable things for ibeta
Browse files Browse the repository at this point in the history
  • Loading branch information
mldangelo committed Feb 1, 2023
1 parent be6db6a commit db7b545
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 44 deletions.
38 changes: 2 additions & 36 deletions public/sample/src/main/java/com/smileidentity/sample/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ package com.smileidentity.sample
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons.Filled
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Warning
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FilterChip
import androidx.compose.material3.FilterChipDefaults.filterChipColors
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -73,37 +70,6 @@ fun MainScreen() {
}
}
},
actions = {
FilterChip(
selected = isProduction,
onClick = {
isProduction = !isProduction
SmileIdentity.setEnvironment(useSandbox = !isProduction)
},
leadingIcon = {
if (isProduction) {
Icon(
imageVector = Filled.Warning,
contentDescription = stringResource(R.string.production),
)
}
},
label = {
val environmentName = if (isProduction) {
R.string.production
} else {
R.string.sandbox
}
Text(stringResource(environmentName))
},
colors = filterChipColors(
labelColor = MaterialTheme.colorScheme.onPrimary,
selectedContainerColor = MaterialTheme.colorScheme.errorContainer,
selectedLabelColor = MaterialTheme.colorScheme.onErrorContainer,
selectedLeadingIconColor = MaterialTheme.colorScheme.onErrorContainer,
),
)
},
colors = smallTopAppBarColors(MaterialTheme.colorScheme.primary),
)
},
Expand Down Expand Up @@ -154,8 +120,8 @@ fun MainScreen() {
currentScreenTitle = Screens.SmartSelfieRegistration.label
val context = LocalContext.current
SmileIdentity.SmartSelfieRegistrationScreen(
allowAgentMode = true,
allowManualCapture = true,
allowAgentMode = false,
allowManualCapture = false,
) { result ->
if (result is SmartSelfieResult.Success) {
val message = "SmartSelfie Registration success"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import androidx.compose.ui.unit.dp
fun ProductSelectionScreen(onProductSelected: (Screens) -> Unit = {}) {
val products = listOf(
Screens.SmartSelfieRegistration,
Screens.SmartSelfieAuthentication,
)
Column(
horizontalAlignment = Alignment.CenterHorizontally,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.smileidentity.sample

import android.app.Application
import com.chuckerteam.chucker.api.ChuckerInterceptor
import com.google.android.material.color.DynamicColors
import com.smileidentity.networking.SmileIdentity
import com.smileidentity.networking.SmileIdentity.getOkHttpClientBuilder
import com.smileidentity.ui.core.init
import timber.log.Timber

Expand All @@ -13,13 +11,10 @@ class SmileIdentityApplication : Application() {
super.onCreate()
Timber.plant(Timber.DebugTree())
DynamicColors.applyToActivitiesIfAvailable(this)
@Suppress("DEPRECATION")
val chucker = ChuckerInterceptor(this)
SmileIdentity.init(
context = this,
useSandbox = BuildConfig.DEBUG,
enableCrashReporting = BuildConfig.DEBUG,
okHttpClient = getOkHttpClientBuilder().addInterceptor(chucker).build(),
useSandbox = false,
enableCrashReporting = true,
)
}
}

0 comments on commit db7b545

Please sign in to comment.