On this page
Privacy, accessibility and reliability share a pattern: small decisions during development add up to a trustworthy app, and fixing them late is expensive. Build them into your definition of done.
Privacy by design
- Ask for less: use the photo picker instead of storage permissions, approximate location when precise isn't needed, and system intents (camera, contacts picker) where possible.
- Ask in context: request permissions when the feature is used, with a clear rationale. See Permissions and Privacy.
- Collect and keep less: define retention and delete data you don't need.
- Be transparent: an accurate Play Data safety form and privacy policy, matching what SDKs collect too.
- Protect what you store: see Encrypted Storage.
val pickMedia = rememberLauncherForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
uri?.let(onImagePicked)
}
Button(onClick = {
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
}) { Text("Choose photo") }Accessibility in Compose
// 1. Meaningful descriptions for icons that act
IconButton(onClick = onFavorite) {
Icon(Icons.Default.Favorite, contentDescription = "Add to favourites")
}
// Decorative images: contentDescription = null
// 2. Merge related content into one focusable item
Row(Modifier.semantics(mergeDescendants = true) {}.clickable(onClick = onOpen)) {
Text(order.title); Text(order.status)
}
// 3. State descriptions for custom controls
Box(Modifier.toggleable(value = checked, role = Role.Switch, onValueChange = onToggle)
.semantics { stateDescription = if (checked) "On" else "Off" })
// 4. Headings for screen reader navigation
Text("Settings", Modifier.semantics { heading() }, style = MaterialTheme.typography.titleLarge)- Touch targets at least 48ร48dp (Material components handle this).
- Font scaling: use
spand test at the largest sizes (Android 14+ supports up to 200%). Avoid fixed heights that clip text. - Contrast: meet WCAG contrast ratios. Don't rely on colour alone.
- Motion: respect the system "remove animations" setting.
Testing accessibility
- Navigate your key flows with TalkBack and with Switch Access or a keyboard.
- Run Accessibility Scanner on screens.
- Compose UI tests can enable accessibility checks, and tests that find nodes by semantics help keep descriptions in place. See Compose UI Testing.
- Use the Play Console pre-launch report, which flags accessibility issues.
Reliability
| Area | Practice |
|---|---|
| Crashes | Crash reporting, fix top clusters weekly, staged rollouts. See Crash Reporting. |
| ANRs | Keep main thread free, use StrictMode in debug. See ANR Errors. |
| Errors | Typed errors, retry options, offline states. See API Error Handling. |
| Vitals | Monitor Android vitals thresholds: bad behaviour can reduce Play visibility |
| Process death | Test "Don't keep activities" and restore state correctly |
Definition-of-done checklist
- Only necessary permissions, requested in context. Data safety form updated.
- TalkBack can complete the flow, and targets and contrast pass Accessibility Scanner.
- Works at the largest font size and in dark mode.
- Loading, empty, error and offline states handled.
- No main-thread I/O. Survives rotation and process death.
Frequently asked questions
Is accessibility legally required?
In many regions, accessibility laws apply to certain apps and organisations (for example the European Accessibility Act). Check what applies to you. Regardless, it widens your audience.
What crash-free rate is good?
Aim to stay well within Android vitals thresholds, and treat any regression as a release blocker. Many teams target very high crash-free user rates.
Conclusion
Trustworthy apps collect less and explain more, are usable with assistive technologies and large fonts, and don't crash or freeze. Put all three into your definition of done and test them like features.
Next step: modernise older codebases with Migrating Legacy Apps to Modern Architecture.
Official references
๐ฑ Apps built by Yunok Tech
Real Android apps on Google Play, free to download.
NotiVaultNotification history: recover dismissed notificationsGet it โธ
Walzi4K wallpapers for lock and home screenGet it โธ
Ready to build real Android applications?
Security is easiest to get right when it is part of how you build from the first screen. Strengthen the Android fundamentals that secure, privacy-respecting apps are built on.
Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.
Explore the Android course and take your next step as an Android developer.