You may have already tried the App Inventor component FirebaseDB or read about it in a blog post earlier this year, but in case you are new to App Inventor, here is the scoop.
Databases are essential features when creating apps because they are used to store information. For example, on a map app, you don’t have to re-enter your home address every time you want to head home because the app stores and retrieves that information for you. Or, when you play a game, you don’t have to stop and think what your previous score was because it displays. Or, if you’re having a party, you don’t have to worry about keeping track of RSVPs in your head because an event app will remember who is coming and who can’t make it.
When creating apps in App Inventor, if you don’t add a database component to your app, no inputted information will be saved and the next time the app starts up, it won’t recall or retrieve any previous data. The TinyDB component allows for persistent data- so each time the app is closed and reopened, the data is available.
Thegood: TinyDB saves data when an app closes and reopens and shares data between multiple screens within the app
Thebad: TinyDB does not share data between multiple users
This means if multiple people use the same event app, they both won’t see the same RSVP list or if they play the same game, they won’t see the same score history. This is where FirebaseDB comes in handy.
FirebaseDB is still an experimental component on App Inventor, but is worth exploring since this cloud database retains and retrieves data when an app closes and reopens and shares consistent, up-to-date data across many users. Everyone who is using the app will see the same information.
Learn to program with FirebaseDB with these app modules: NoteTakerand HowMyFriends.
Learn to create a UI for HowMyFriends.
New App Inventor Curriculum for SF Middle Schools
September 14, 2016
The San Francisco Unified School District (SFUSD) is making great strides in rapidly adding computer science courses to the curriculum in public middle schools and high schools, and App Inventor is a vital part of it. SFUSD’s Bryan Twarek and Andrew Rothman have designed an on-line middle school curriculum which combines video and other lessons from appinventor.org, Mobile-CSP.org, appinventor.mit.edu, and a number of other venues, and breaks lessons down into 50 minute classroom chunks. The well-organized site is being used this fall in SF middle schools. Check it out and contact Bryan (email@example.com) to get access to the teacher side of it.
The middle school curriculum is part of SFUSD’s Computer Science for All Students in SF effort. The goal is to make real computer science– with coding and problem solving– part of the curriculum throughout the grade levels, and to help broaden participation in Tech, as this excerpt from their site attests:
By beginning in the earliest grades and with all children, we will normalize a discipline that has been long dominated by a selective group of the population.
SFUSD teachers are also teaching some of the first AP High School Computer Science Principles (CSP) courses on the West Coast, an effort led by SFUSD’s Jennie Lyons.
The Democratize Computing Lab at the University of San Francisco is partnering with the school district in these efforts. Led by my colleague Alark Joshi and I, we provide materials and advice on curriculum development, offer summer training workshops for high school teachers, and facilitate a program whereby USF students in the Democratize Computing Lab assist teachers at schools sites each semester.
Test Your App Inventor Knowledge
August 27, 2016
If you have been reading App Inventor tutorials, discovering new apps in the App Inventor Gallery, building apps from scratch and expanding your coding capabilities, you are ready to play:
Test Your App Inventor Knowledge!
This simple quiz will determine if you’re on track learning the latest updates to the App Inventor platform.
You are frustrated because of the limited color options available in the App Inventor Designer, so you use:
A)the color grid in the Blocks Editor
B)the Make Color block in the Blocks Editor
C)the Screen Initialize and Set Background Color blocks
You have a lot of data to display and want to create a streamlined UI, so you use which of the following Components?
You want to change the shape of some Buttons, so you use which of the following properties?
When creating an app with multiple screens, you can use which of the following blocks?
B)Open another screen
To create a form in the Designer, which of the following could you use?
A)Textbox Hint Property
To create a new color in App Inventor with the Make Color block, you could:
A)Input any color’s RGB value
B)Access one of 16 million colors
C)Find a color on the Adobe Kuler Wheel
To make a copy of the app you are working on you could use:
A) Save project as
C) Export selected proejct
All About Buttons
June 22, 2016
Buttons are an essential component in creating mobile apps on App Inventor. You can use them to do things like submit information, navigate screens, clear data, and stop or start game play. Here is a quick intro guide to creating and using buttons in App Inventor.
The Button component is found at the top of the User Interface Palette in the Designer.
Click on the Button at the top of the User Interface Palette (#1) on the left side of the screen and drag it to the Viewer (#2). The Button automatically displays “Text for Button1”, which you can easily change in the properties panel text box (near the bottom on the far right of the screen, #3).
Changing the text that appears on the button is part of the UI design that the app user will see. Depending on what the button will be used for, it could display instructions like: “Submit,” “Next,” “Play,” etc.
Note: Changing the button display text should not be confused with renaming the button. Changing the button name helps you, the designer/coder, to keep your buttons organized. Thus “SubmitButton” is an appropriate name for a button that displays the text “Submit”.
A key coding principle for buttons (and for many components) is naming them appropriately. Whenever you create a new button in the Designer, it will automatically be named Button1, Button2, Button3, etc. When you first start building apps, your interface will be simple and thus it will be easy to keep track of which buttons perform which functions. But as you progress to creating more complex applications, you will quickly discover that it is difficult to remember what Button7 or Button14 does. Thus, it is good practice to rename buttons to clearly describe their function so that when you begin coding in the Blocks Editor, each button purpose is obvious.
The recommended standard is to use a capitalized descriptive name, followed by the capitalized component name – with no spaces between words. Examples include: “SubmitButton”, “NextButton” or “PlayButton”. (AppInventor doesn’t allow spaces so if you type the name “Submit Button” with a space in between the words, App Inventor will automatically insert an underscore and name your button “Submit_Button”.)
To rename a button, activate it by clicking on it in the Viewer or in the Components Panel (it will highlight with a light green box around the name). Then click the “Rename” button at the bottom of the Components Panel (#4). A pop-up window will appear, insert the new name into the text box and click “OK” (#5).
Note: If for example you rename your first button from Button1 to “PlayButton”, and then drag another button onto the Viewer, App Inventor will name it Button1 even though it is not the first button you created. This example illustrates the importance of not relying on the order of creation, but rather on appropriate naming to keep buttons organized.
Any changes you make in the Designer will be reflected in the Blocks Editor (#6). Notice at the bottom of the Blocks Palette, there is another option to Rename (or delete) buttons. Thus, changes can be made there as well.
If you decide that a button is no longer needed, deleting it is simple. Click on the button in the Viewer or Components Panel in the Designer or in the Blocks Panel in the Editor and then click “Delete”. A pop-up window will confirm deletion (#7). Click “OK”.
The Properties Panel in the Designer provides many options to change the format of your buttons. Click on the button in the Viewer or the Components Panel to see a list of options. The changes you make to the properties are reflected in the Viewer (#8 & #9).
And of course, to get the full effect of how your app will look, it is always recommended to view your changes live on your mobile device or with the on-screen emulator.
For information on coding buttons, stay tuned for All About Buttons, Part 2.