MA3: Native or cross-platform: Swift, Kotlin, Flutter and React Native
Native Android with Kotlin
🎯You'll be able to
Describe how a native Android app is built with Kotlin and Jetpack Compose, and what tools it needs.
🏠The everyday picture
A carpenter who works only in teak knows exactly how it behaves: how it bends, where it splits, which tools suit it. They can do things with teak that a general carpenter can't.
📘What it really is
- Kotlin is the main language for Android, recommended by Google. Older apps use Java, and the two work together.
-
Jetpack Compose is Android's modern way to build screens from functions that describe the UI, similar in spirit to React components.
-
Android Studio is the editor; Gradle builds the app into an Android App Bundle (
.aab) for Google Play, or an.apkfor testing. -
Jetpack libraries cover storage (Room, over SQLite), background work (WorkManager), navigation and more.
- Strengths: full access to every Android feature on the day it ships, and the best tools for Android-only performance work.
📝A worked example
Input: a list row in Compose, to compare with KhetNote's VisitRow.
Steps:
- Write
@Composable fun VisitRow(visit: Visit, onOpen: (String) -> Unit). - Inside, a
RowwithText(visit.farmId)andText(visit.date), andModifier.clickable { onOpen(visit.id) }.heightIn(min = 48.dp). - Show many rows with
LazyColumn, which, likeFlatList, draws only what's on screen.
Expected output: a row you can compare line by line with the React Native version.
🌍Where it's used
- Android-first products in markets where most users have Android phones.
- Apps that use the newest Android features, such as widgets or deep system integration.
- Device makers' own apps.
📝Case scenario
A team building a bus-ticket app for a city where most riders use Android started native, in Kotlin. When they later added iOS, they reused the server and design but rebuilt the screens in Swift. Having two codebases cost more, which they accepted for the best fit on each platform.
🖱️Try it
Read the official Android developer guide's page on Jetpack Compose basics, then map three Compose ideas to React Native ones (for
example LazyColumn and FlatList). Success: three clear pairs.
⚠️Common mistakes
- "Native is always faster". Sign: choosing native for a simple form app. Fix: measure what the app needs.
- Ignoring Java code. Sign: surprise at older code in a project. Fix: expect both.
- Building only an
.apk. Sign: a store upload refused. Fix: Google Play expects an App Bundle for new apps.
🛠️For your project
The capstone's design notes compare KhetNote's React Native approach with one native option.
✅Quick check
What is Jetpack Compose?
Show the answer
Android's modern toolkit for building screens from functions that describe the UI.
What's Android's equivalent of a FlatList?
Show the answer
LazyColumn in Compose (or RecyclerView in older code).
