What an app actually is
Before you write a single line, it helps to know what you are actually making. An app is not magic — it is a folder of instructions, a picture of a screen, and one rule about what happens when someone taps.
Why start here
You are about to build apps. In about twenty minutes you will have one running on your own phone. But there is a question worth answering first, because it makes everything afterwards easier:
What is an app, actually?
Most people have never had a reason to ask. An app is just a thing that appears when you tap an icon. That is a perfectly good answer for using a phone. It is not good enough for making one.
Think about a board game in a box.
The box has a picture on the lid so you can spot it on a shelf. Inside there is a board showing where everything goes, some pieces, and a rulebook saying what happens when a player does something.
An is that box. The icon is the lid. The screen is the board. The is the rulebook — the part that says "when the player taps this, that happens."
Nobody thinks a board game is magic. It is just a box with rules in it. Apps are the same, and you are about to write the rules.
The three things every app is made of
Open any app on your phone right now — a calculator, a messaging app, anything. Whatever you are looking at, it is built from exactly three kinds of stuff.
1. Things you can see
The buttons, the text, the pictures, the colours. In the trade this is called the user interface, usually shortened to UI. It is the board of the board game: the part laid out in front of the player.
Every single thing on the screen was put there deliberately by somebody. The spacing around a button, the exact grey of a line of small print — someone chose all of it. Soon that someone will be you.
2. Things the app remembers
A calculator remembers the number you are part-way through typing. A notes app remembers your notes. A game remembers the score.
Information that can change while the app is running is called . It is the most important idea in this entire course, and we will come back to it many times. For now, hold on to the short version:
State is what the app knows right now.
Some state disappears when you close the app — the half-typed number in a calculator. Some state has to survive being closed, reopened, and the phone being restarted — your notes. Those two need very different treatment, and Part 4 is largely about the difference.
3. Rules about what happens next
Tap the 7 key on a calculator and a 7 appears. Tap it again and you get 77, not 14. Somebody wrote that rule.
Rules are written as . Here is a real rule, written in — the language you will learn:
1// When the player taps, add one to the score.
2fun onTap() {
3 score = score + 1
4}You are not expected to understand that yet. Look at the shape of it, not the detail. It says: here is a thing that happens (onTap), and this is what it does (score goes up by one). That is all code ever is — things that happen, and what they do.
Notice the first line beginning with //. That is a — a note written for humans. The phone ignores it completely. Comments are how you leave messages for yourself, and you will be very glad of them in three weeks' time.
So what is actually on the phone?
Here is the part that surprises people.
When you install an app, you are not installing a program in the way a computer normally has programs. You are installing a single file — an . That one file contains your compiled code, every picture, every piece of text, and a short description of the app itself.
Android unpacks it, files the pieces away, and puts an icon on your home screen.
That is genuinely all an installed app is: one file, unpacked.
Your code, your pictures, your text.
An app on a home screen is just an icon pointing at one installed APK.
Where Pocket Studio fits
To turn your rules into one of those files, you need a workshop: somewhere to write the code, something to check it for mistakes, and something to package it all up.
That workshop is . It is an — one app that holds every tool you need — and the unusual thing about it is that it runs on the phone itself.
Traditionally you would need a laptop, several gigabytes of downloads, and an afternoon of setup. Pocket Studio does the whole job on the device in your hand: you write the code, it a real APK using real , and it installs it on the same phone. No computer is involved at any point.
This is not a simulator or a toy sandbox. The apps you build in this course are the same kind of file you would download from Google Play. You could hand one to a friend.
What you are going to build
Three real apps, in increasing order of difficulty:
| App | What it is | What it teaches |
|---|---|---|
| Dice Duel | A two-player dice game with a rolling animation | Screens, state, animation |
| Pocket Notes | Notes that survive closing the app | Databases, lists, editing |
| Focus Flow | A focus timer with stats and settings | Multiple screens, saved settings, charts |
Every one of them ends up as an icon on your home screen.
You cannot write code yet — that is the next two lessons. But you can get set up now, and it takes under a minute.
- Open Pocket Studio on your phone.
- If this is your first time, let it finish any first-run setup it offers.
- Look at the bottom of the screen and find the tabs: Projects, Editor, Build.
- Tap Projects. It will probably be empty. That is exactly right — you are about to fill it.
- Leave it open. Lesson 0.2 starts here.
- An app is three things: what you see, what it remembers, and the rules for what happens next.
- The stuff it remembers while running is called . It is the central idea of this course.
- An installed app is a single file that Android unpacks.
- is the workshop where you write, build and install it — all on the phone, with no computer.
- Next: a proper tour of Pocket Studio, so you know where everything lives before you need it.