Tag Archives: android

What is inside a .aia project file?

As you may know, you can save your App Inventor project to your local computer using the Projects | Export selected project (.aia) to my computer menu option:

ExportSelected

Use this feature to save a backup copy on your local computer or to share your code with others (email or transfer the file using DropBox – or similar – or merely copy to a USB thumb drive).

What is inside the .aia file?

Surprisingly, the .aia file is just a regular .zip file. You can verify by saving a copy to your local disk drive, and then rename the file to have a .zip file extension instead of .aia. Then use Windows Explorer, StuffIt Expander or other utility to open and decompress the .zip file.

PLEASE NOTE – DO NOT MODIFY THE CONTENT OF THESE FILES.  THIS INFORMATION IS NOT SOMETHING YOU NEED TO KNOW TO WRITE APP INVENTOR APPS AND IS PROVIDED “AS IS” “FOR YOUR INFORMATION” ONLY.

Continue reading What is inside a .aia project file?

Using TimePicker and DatePicker for entering time and date information

The TimePicker and DatePicker User Interface Controls

Entering the date and time are common features of business applications. We could use a text edit box and let the user type in times (like 10:30) or dates (12 January 2015) but both methods require the user to enter the time or date in the proper format – and the app needs to test the entered data to ensure it was entered correctly.

A better solution is to use App Inventors TimePicker and DatePicker controls. Both provide a graphical method of selecting input values. For example, the TimePicker displays the following:

TimeDate_TimePickerUIThe time is set by pressing the + or – buttons above and below the hours and minutes. The AM/PM indicator is a toggle – when it shows PM, a press changes it to AM, and when it shows AM, a press changes it to PM. With this input system, the user can never entered an invalid time (the user could, of course, enter the wrong time, but that is a different problem!)

Continue reading Using TimePicker and DatePicker for entering time and date information

TOO MANY TOTES! Android game written in App Inventor

It’s free – the TOO MANY TOTES! game for Android devices – download at the Google Play Store.

The app was created by student members of the Glencoe High School FIRST Robotics Team #4488 “Shockwave” and was developed using MIT App Inventor. The Android game is inspired by the 2015 FIRST Robotics Competition game called “Recycle Rush”. In the game, robots must stack a variety of container “totes” and a trash can on top and relocate the containers to a recycle zone on the playing field. Students design, build and test their robots – weighing up to about 120 pounds or 55 kilograms – these are large, complex pieces of mechanics, controlled by an advanced system controller, with control software also written by the student team. To learn more about FIRST Robotics, visit the web site at http://usfirst.org

I am one of many volunteer engineering mentors to the Shockwave Team. This year, I was mentor for the applications software team, that has developed a number of Android apps (the game is the only one publicly available), an Excel spreadsheet (written in VBA) to analyze data and develop optimal strategies, plus another app written in Python to process text comments about other robotics teams.

The team’s Android apps are written using MIT App Inventor.

 

Displaying web pages in your Android apps

Last year, I presented a short tutorial on displaying web pages from inside your App Inventor apps. Now, here is a some what improved version that prompts for a web address URL, checks to see if http:// has been entered, and if not, prepends http:// to the front of the address. Then the web page is displayed.

The Designer View

There is not much to the user interface – a text box to enter the web URL and a button to display the web page. The page then appears below the button, and the content may be scrolled on the screen.

To create this user interface, drag a horizontal layout onto the screen and then add a label for the “Web page URL” prompt, followed by a text box for the data entry. Then add the Display web page button.

From the User Interface section of the Palette, at the left of the Designer screen, drag and drop a WebViewer component on to the design area.

Screenshot_2015-02-10-15-15-17

 

The WebViewer is not a full Internet browser – it is a component that displays the specified web page only. The WebViewer does not support standard browser features, such as saving web page content nor does it provide a history of the web pages visited.

The Blocks Code

Continue reading Displaying web pages in your Android apps

Part 2: Sending numeric data using App Inventor Bluetooth communications

Part 1 of this tutorial introduced Bluetooth communications and implemented a simple method of sending text data back and forth between two Android devices over the Bluetooth wireless link. If you are not familiar with using App Inventor’s Bluetooth component, start with Part 1.

In Part 2, a data packet concept is introduced to guide the communications between devices, and is used to send a combination of text and numeric data. This section introduces the concept of binary numbers so that you can understand why we would handle text and numbers in different ways.

This tutorial modifies the user interface of both the client and server programs introduced in Part 1. Then, blocks code is added to send text and numeric data. Numeric data is sent as binary data using special methods of the Bluetooth components.

Related:

Continue reading Part 2: Sending numeric data using App Inventor Bluetooth communications

Positive comments about MIT App Inventor from i-Programmer

App Inventor is an amazing way to create Android applications. You don’t need to be able to program to use it, but if you can then all the better.

All I can say is that as a programmer this is the first time in quite a while that a development environment and its associated “language” has brought a smile to my face. It’s not perfect, but if you give it a little room to grown on you might just smile as well.

Although App Inventor is sometime described as an educational toy that you can use to get kids interested in programming, don’t let this fool you into thinking that you can’t do real things with it. It makes a very good prototyping facility and a couple of the prototypes that I have created have actually ended up as final apps that are still in use.

via Getting started with MIT App Inventor 2.

I have the same thoughts about App Inventor too. App Inventor is much bigger than a tool for teaching programming.