Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions examples/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Build a sample Android app with:
- Package name: com.onesignal.sdktest (must match google-services.json and agconnect-services.json)
- All dialogs should have EMPTY input fields (for Appium testing - test framework enters values)
- Material3 theming with OneSignal brand colors
- App name (in strings.xml): "OneSignal Demo"
- Top app bar: use CenterAlignedTopAppBar (Material3) with the OneSignal logo + "Sample App" text, centered horizontally
```

### Prompt 1.2 - OneSignal Code Organization
Expand Down Expand Up @@ -178,18 +180,23 @@ App Section layout:
- Separated from the above toggle by a horizontal divider
- NOT a blocking overlay - user can interact with app regardless of state

4. "Logged in as" display (ABOVE the buttons, only visible when logged in):
- Prominent green Card background (#E8F5E9)
- "Logged in as:" label
- External User ID displayed large and centered (bold, green #2E7D32)
- Positioned ABOVE the Login/Switch User button
4. User status card (always visible, ABOVE the login/logout buttons):
- Card with two rows separated by a divider
- Row 1: "Status" label on the left, value on the right
- Row 2: "External ID" label on the left, value on the right
- When logged out:
- Status shows "Anonymous"
- External ID shows "–" (dash)
- When logged in:
- Status shows "Logged In" with green styling (Color(0xFF2E7D32))
- External ID shows the actual external user ID

5. LOGIN USER button:
- Shows "LOGIN USER" when no user is logged in
- Shows "SWITCH USER" when a user is logged in
- Opens dialog with empty "External User Id" field

6. LOGOUT USER button
6. LOGOUT USER button (only visible when a user is logged in)
```

### Prompt 2.2 - Push Section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand Down Expand Up @@ -103,7 +103,7 @@ fun MainScreen(viewModel: MainViewModel) {
Box(modifier = Modifier.fillMaxSize()) {
Scaffold(
topBar = {
TopAppBar(
CenterAlignedTopAppBar(
title = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -33,7 +33,7 @@ class SecondaryActivity : ComponentActivity() {
OneSignalTheme {
Scaffold(
topBar = {
TopAppBar(
CenterAlignedTopAppBar(
title = { Text("Secondary Activity", color = Color.White) },
navigationIcon = {
IconButton(onClick = { finish() }) {
Expand Down
Loading