Learn MIT-APP-INVENTOR with Real Code Examples
Updated Nov 23, 2025
Code Sample Descriptions
MIT App Inventor Simple Todo App
1. Drag a TextBox component onto the screen for 'New Todo'.
2. Drag a Button labeled 'Add' -> logic: Append input value to List variable 'todos'.
3. Drag a ListView component bound to 'todos' to display items.
4. Add blocks to reset input after adding tasks.
5. Test live on Android device using MIT AI2 Companion and export APK when done.
Demonstrates a simple MIT App Inventor app with a Todo list, adding tasks and displaying them using drag-and-drop components and block-based logic.
MIT App Inventor Counter App
1. Create variable 'count', initialize to 0.
2. Add Buttons '+', '-', 'Reset'.
3. Configure '+': Set 'count' = count + 1.
4. Configure '-': Set 'count' = count - 1.
5. Configure 'Reset': Set 'count' = 0.
6. Bind a Label to 'count' to display the value.
A simple counter app using variables and block logic for incrementing, decrementing, and resetting.
MIT App Inventor Login Form
1. Add TextBoxes: 'Username' and 'Password'.
2. Add Button 'Login'.
3. Blocks: If both fields are non-empty -> Navigate to 'Home' screen.
Else -> Show Alert 'Invalid credentials'.
Shows a login form with validation using block logic and conditional navigation.
MIT App Inventor Notes App
1. Create variable 'notes' (List).
2. Add TextBox or TextArea for note entry.
3. Add Button 'Save Note' -> Append input to 'notes'.
4. Bind ListView to 'notes'.
5. Add optional logic to clear input or delete items.
Stores and displays notes using List variables and block logic.
MIT App Inventor Stopwatch App
1. Create variable 'seconds', initialize to 0.
2. Add Label bound to 'seconds'.
3. Add Buttons: 'Start', 'Stop', 'Reset'.
4. 'Start' -> Clock.Timer every 1 sec -> increment 'seconds'.
5. 'Stop' -> disable Timer. 'Reset' -> Set 'seconds' = 0.
Implements a stopwatch using Clock component and variable updates.
MIT App Inventor Theme Toggle App
1. Create variable 'isDark' (boolean).
2. Add Switch bound to 'isDark'.
3. Blocks: Change background/text colors based on 'isDark'.
4. Add Label: Show 'Light Mode' or 'Dark Mode'.
5. Preview switching on device.
Switches between light and dark themes using a Switch component and conditional blocks.
MIT App Inventor Calculator App
1. Create variables: 'num1', 'num2', 'result'.
2. Add two TextBoxes for numbers.
3. Add Buttons '+', '-', '*', '/'.
4. Blocks: On button press -> Set 'result' = formula(num1 op num2).
5. Bind Label to 'result'.
A simple four-function calculator using number inputs and formula blocks.
MIT App Inventor Weather App
1. Add TextBox for city name input.
2. Add Web component -> connect to weather API.
3. Bind API response to variable 'weatherData'.
4. Add Button 'Fetch' -> call API.
5. Bind Labels/ListView to display temperature, conditions.
Fetches weather data from an API and displays it using Labels and ListView components.
MIT App Inventor Image Gallery
1. Create variable 'images' (List of URLs).
2. Add ListView bound to 'images'.
3. Inside ListView -> Add Image component bound to current item's URL.
4. Add Button 'Add Image' -> Append new URL to 'images'.
5. Preview images on device.
Displays images using a list variable and Image/ListView components.
MIT App Inventor QR Scanner App
1. Add Button 'Scan QR'.
2. Add Barcode Scanner component -> connect to button.
3. Create variable 'qrResult'.
4. Store scanner output -> 'qrResult'.
5. Bind Label to 'qrResult' to display scanned data.
Scans QR codes and displays results using device scanner component and logic blocks.