Bring the vegetable seller's orders to villagers' phones: React Native, Expo, location permission, animation, Capacitor.
What the levels ask
Ms. Sulis, the greens seller of Kersen Lane, already has a web page for orders. The villagers want an app on their phones. There are two must-haves: the app is in the Play Store and the App Store, and its order list is drawn by the phone's own views so it feels like a phone app. Pick the way. Each way's project was really made, and the phone on the stage reads out the files it produced.
The app's first screen: the title Sayur Sulis, the time the motor passes, and a Pesan bayam button that adds to the count of bunches. Mrs. Sari tries it on her Android phone: she taps that button twice and wants to see 2 ikat bayam. Fill the title hole and the button hole in index.tsx.
The screen now writes Besok: N pesanan under the title. Mrs. Sari has two orders for tomorrow. Grandma Marni has not ordered anything, and on her phone that line must not appear at all. Fill the condition in front of && so both phones are right and neither complains.
Time for the native projects. npx expo prebuild makes the android/ and ios/ folders from app.json. The neighbourhood head reads the result and asks: whose name is the app under? Ms. Sulis owns the domain sayur-sulis.id, so the app's ID is made from that domain, reversed. Pick one ID for android.package and ios.bundleIdentifier that prebuild accepts for both Android and iOS. This ID is the app's identity in the stores and cannot change after release.
The app will ask villagers for their location, for where the motor stops. Ms. Wulan's iPhone shows a reason in its permission dialog, taken from Info.plist. Grandma Marni only allows it if she can read the reason. Fill the options of the expo-location plugin in app.json: the reason in the dialog must be an Indonesian sentence that says what it is for, and the app must not ask for location while it is closed.
Ms. Sulis wants the word sekali (once) added to the reason: your location is used once only. Yesterday the sentence was changed directly, and this morning Dina runs npx expo prebuild again on her laptop. Pick where that change lives so the new sentence is still in Info.plist after Dina's prebuild.
The Mampir ke rumahku screen sends the house's point so the motor stops in front of it. Grandma Marni reads the screen first. If her phone asks for her location before she touches anything, she says no, and the phone remembers that no. Fill when the app asks for location, and what the button does, so Grandma's point is sent.
Mr. Tono does not want his location used. He taps Kirim lokasiku, refuses the permission, then waits. The motor must still be able to stop at his house. Fill the failure handling of getCurrentPosition so the screen gives him a Patokan rumah box to write in.
The Motor sudah dekat? screen watches the GPS with watchPosition and counts its reports. Mrs. Ijah opens it, waits for three reports, then closes the screen and puts the phone in her pocket. Yesterday her battery was empty before noon. Fill the cleanup in useEffect so the GPS stops reporting once the screen closes.
When an order is ready to deliver, its badge grows from 1 to 1.3 in 300 ms. Bagas uses a cheap phone, and every re-render shows. Pick the badge file index.tsx uses: the badge must really grow, and React must not re-render on every frame.
Mrs. Yanti taps Antar, and the Di jalan badge slides 50 pixels in one second. A moment later, in the middle of that slide, her phone reads 300 orders: the JavaScript thread is fully busy for 500 ms. Pick the badge file that keeps moving while JavaScript is busy and reaches its end.
When the motor sets off, the badge springs back from 1.15 to 1. Mrs. Sari likes the bounce. Grandma Marni gets dizzy from movement and has turned on Reduce motion on her phone. Fill the spring so Mrs. Sari's badge bounces down below 1, and Grandma's badge rests at its final size at once.