Description
Implement the consent dialog shown once on the app's first launch.
File to create
app/src/main/java/com/vrhub/ui/components/ConsentDialog.kt
Expected behavior
- On first launch, display
ConsentDialog (non-dismissible via back/touch outside)
- Provide two actions: Accept and Decline
- Persist
has_seen_consent_dialog = true in SharedPreferences
- If Accept: persist
consent_enabled = true in DataStore
- If Decline: persist
consent_enabled = false (default)
UI
- Title: "Help Improve VRHub"
- Explanatory text with bullet points on collected and non-collected data
- Material3 buttons:
Button (Accept) + OutlinedButton (Decline)
Integration
- Call from
MainActivity.kt / MainScreen via a LaunchedEffect(Unit)
- Use
ConsentPreferences to persist the choice
Reference
docs/CLIENT_SPEC.md §2 (Consent Flow, Privacy Notice)
docs/CLIENT_IMPLEMENTATION.md §5
Description
Implement the consent dialog shown once on the app's first launch.
File to create
app/src/main/java/com/vrhub/ui/components/ConsentDialog.ktExpected behavior
ConsentDialog(non-dismissible via back/touch outside)has_seen_consent_dialog = truein SharedPreferencesconsent_enabled = truein DataStoreconsent_enabled = false(default)UI
Button(Accept) +OutlinedButton(Decline)Integration
MainActivity.kt/MainScreenvia aLaunchedEffect(Unit)ConsentPreferencesto persist the choiceReference
docs/CLIENT_SPEC.md§2 (Consent Flow, Privacy Notice)docs/CLIENT_IMPLEMENTATION.md§5