The Android Ecosystem — What You Need to Know Before Writing a Single Line of Code
Lesson opener
In one line: How mobile apps differ from websites - the mental model shift every web developer needs first.
Why it matters: This shows up at work when you need to how mobile apps differ from websites - the mental model shift every web developer needs first.
Before you start
| Resource | Link |
|---|---|
| Previous | BA Capstone |
| Next | React Native fundamentals |
| Prerequisites | Basic programming ( py1–py6 ) or HTML/CSS/JS with React basics |
| Time | ~55 minutes |
| What you need | Windows PC, Android phone (optional but recommended), Wi‑Fi |
What you will learn
- How mobile apps differ from websites — the mental model shift every web developer needs first
- What Android is and why permissions work differently than a browser
- Which technology stack this course uses (React Native + Expo) and why
- The Activity lifecycle — why ignoring it causes one-star reviews
- Complete Windows setup with exact commands and expected outputs
Section 1 — Web vs mobile: the honest framing
Plain English:
If you build websites, you know:
- Write code → save file → refresh browser → done
- Anyone with a URL can use it instantly
- Update it anytime without asking permission
Mobile apps work completely differently:
- Write code → compile → package → sign → submit to store → wait for review → publish
- Users must download and install
- Updates require resubmission and re-approval
- Apple and Google can reject your app
This is not harder — it is different. This lesson teaches the difference before teaching the code.
Section 2 — What Android actually is
Plain English:
Android is an operating system built on Linux, maintained by Google, and installed on 3+ billion devices. Your app runs as a sandboxed process on top of this OS.
Unlike a website where the browser handles rendering, security, and network access — your Android app must explicitly request permissions for everything:
| Capability | On the web | On Android |
|---|---|---|
| Camera | Browser may prompt | You must declare + request |
| Location | Browser may prompt | You must declare + request |
| Internet | Usually implicit | You must declare in manifest |
| Storage | Sandboxed per origin | You must request scoped storage |
The OS grants or denies these. The user can revoke them anytime from Settings.
Breaking it down:
- Sandboxed — your app cannot read another app's files by default
- Declare — you list permissions in app config before the store will accept the build
- Request — at runtime, Android shows a system dialog; user can deny
Use this when: planning features — if you need GPS, budget time for permission UX and fallback when denied.
Section 3 — Technology choice (decision made for you)
| Approach | Language | Pros | Cons | Best for |
|---|---|---|---|---|
| Native Android | Kotlin/Java | Full device access, best performance | Android only, steep curve | Professional Android devs |
| React Native | JavaScript | Web-like syntax, cross-platform | Bridge overhead, some native limits | Web devs moving to mobile |
| Flutter | Dart | Beautiful UI, fast, cross-platform | New language (Dart) | Fresh starters |
| PWA | HTML/CSS/JS | No install needed | Limited device access, no Play Store | Simple use cases |
This course uses React Native + Expo because:
- You already know JavaScript from web work
- One codebase runs on Android and iOS
- Expo eliminates most native setup complexity
- The mental model transfer from React on the web is fastest
If you want pure native Kotlin — the concepts in this lesson (lifecycle, permissions, store submission) still apply, but the syntax will differ.
Section 4 — The Android app lifecycle
Plain English:
Your app is not always running. The OS can pause it, stop it, or kill it entirely to free memory. Your app must save its state when paused and restore it when resumed.
If you ignore the lifecycle, users will lose data every time they switch to another app and return. This is the #1 source of one-star reviews for new app developers.
| State | What happened | Your job |
|---|---|---|
| Resumed | User is actively using your app | Run animations, accept input |
| Paused | Another app covers yours (dialog, split screen) | Stop heavy work; save draft data |
| Stopped | App not visible | Persist important state |
| Destroyed | OS reclaimed memory | Restore from storage on next launch |
With Expo / React Native, much of this is handled by the framework — but your data (game score, form text, high score) still needs explicit persistence. That is why android4 covers AsyncStorage.
Section 5 — Complete setup guide (Windows)
Presented as numbered steps with exact commands and expected outputs.
Step 1 — Install Node.js (required for Expo)
- Download: https://nodejs.org → LTS version (20.x or 22.x)
- Run the installer → accept defaults → finish
- Verify — open Command Prompt (Win+R →
cmd):
node --versionExpected: v20.x.x or higher (e.g. v20.18.0)
npm --versionExpected: 10.x.x or higher
Step 2 — Install Expo tooling
Modern Expo uses the CLI via npx (no global install required):
npx expo --versionExpected: version number prints (e.g. 0.22.x or similar — exact number varies)
Optional legacy global install (your docs may reference this):
npm install -g expo-cli— not required if you usenpx expoeverywhere below.
Step 3 — Install Expo Go on your phone
- Android: Google Play Store → search "Expo Go" → Install (by Expo Project)
- iOS: App Store → search "Expo Go" → Install
This lets you test on your real device instantly — no emulator required for lesson one.
Step 4 — Create your first project
npx create-expo-app MyFirstApp
cd MyFirstApp
npx expo startExpected terminal output: Metro bundler starts, QR code appears in terminal or browser DevTools.
Step 5 — Connect your phone
- Ensure phone and computer are on the same Wi‑Fi
- Open Expo Go on your phone
- Scan the QR code from the terminal (Android: scan from Expo Go; iOS: Camera app)
- Your app appears on your phone — default Expo welcome screen
Common setup failures:**
- Firewall blocking port 19000 → temporarily allow Node/Expo through Windows Firewall, or run
npx expo start --tunnel(slower but works across networks)- Different Wi‑Fi networks → connect phone to the same network as your laptop
- Expo Go version mismatch → update Expo Go from the Play Store / App Store
- Corporate VPN → disconnect VPN on both devices for local testing
Practice
Do this now:
- Run
node --versionandnpx expo --version— screenshot or note the output - Create
MyFirstAppand load it in Expo Go on your phone - Switch to another app and back — notice the app may reload (development mode); note why persistence matters for android4
Checklist
Before moving to React Native fundamentals, confirm:
- [ ] Can you explain three ways mobile apps differ from websites?
- [ ] Do you know why Android requires explicit permissions?
- [ ] Can you name the lifecycle states where you should save user data?
- [ ] Did
npx create-expo-appandnpx expo startwork on your machine? - [ ] Did the app load on your phone via Expo Go?
What's next
React Native fundamentals for web developers — every HTML/CSS concept mapped to mobile components.
Same codebase on iOS: After android8, continue with iOS App Development on a Mac — React Native shares most of your game code; Apple’s store rules and design guidelines differ.