INNER CODE UNIT · Kotlin
paymentSheet
shmykelsa/AAAD · app/src/main/java/com/legs/appsforaa/AboutPaymentActivity.kt:67
paymentSheet = PaymentSheet(this) { result ->
onPaymentSheetResult(result)
}
// Authenticate and initialize (MUST happen before database access)
lifecycleScope.launch {
try {
// Authenticate with Firebase (silent, no UI)
deviceId = com.legs.appsforaa.managers.AuthManager.ensureAuthenticated()
Logger.d("AboutPaymentActivity", "Authentication successful, UID: $deviceId")
// Display countdown in days if user is in cooldown
if (nextTry != null && nextTry > 0) {
val nextTimeTextView = findViewById<TextView>(R.id.next_time_download)
val currentTime = System.currentTimeMillis()
val timeRemaining = nextTry - currentTime
if (timeRemaining > 0) {