@@ -93,7 +93,8 @@ class MainActivity : ComponentActivity() {
9393 },
9494 onCustomSlotsClick = {
9595 startActivity(Intent (this , CustomSlotsThemingDemoActivity ::class .java))
96- }
96+ },
97+ isEmulatorMode = USE_AUTH_EMULATOR
9798 )
9899 }
99100 }
@@ -105,7 +106,8 @@ class MainActivity : ComponentActivity() {
105106fun ChooserScreen (
106107 onHighLevelApiClick : () -> Unit ,
107108 onLowLevelApiClick : () -> Unit ,
108- onCustomSlotsClick : () -> Unit
109+ onCustomSlotsClick : () -> Unit ,
110+ isEmulatorMode : Boolean = false
109111) {
110112 val scrollState = rememberScrollState()
111113
@@ -133,7 +135,34 @@ fun ChooserScreen(
133135 color = MaterialTheme .colorScheme.onSurfaceVariant
134136 )
135137
136- Spacer (modifier = Modifier .height(32 .dp))
138+ // Emulator Mode Warning
139+ if (isEmulatorMode) {
140+ Card (
141+ modifier = Modifier .fillMaxWidth(),
142+ colors = CardDefaults .cardColors(
143+ containerColor = MaterialTheme .colorScheme.errorContainer
144+ )
145+ ) {
146+ Column (
147+ modifier = Modifier .padding(16 .dp),
148+ verticalArrangement = Arrangement .spacedBy(8 .dp)
149+ ) {
150+ Text (
151+ text = " ⚠️ Emulator Mode" ,
152+ style = MaterialTheme .typography.titleMedium,
153+ color = MaterialTheme .colorScheme.onErrorContainer
154+ )
155+ Text (
156+ text = " Running with Firebase Auth Emulator. Some features like third-party" +
157+ " OAuth providers (Facebook, Twitter, LINE etc.) may not work correctly." +
158+ " Disable Firebase Auth Emulator using" +
159+ " MainActivity.USE_AUTH_EMULATOR = false" ,
160+ style = MaterialTheme .typography.bodySmall,
161+ color = MaterialTheme .colorScheme.onErrorContainer
162+ )
163+ }
164+ }
165+ }
137166
138167 // High-Level API Card
139168 Card (
0 commit comments