All posts by edwardm

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.

Blocks Editing Tip: Arranging and collapsing blocks in the editor

As you develop your App Inventor program using the Blocks editor, do you find your blocks overlapping and crashing in to one another on the screen? You know, like this:

AIBlockMess

You can drag the blocks on the screen so they no longer overlap, but dragging each block is tedious (time consuming). But there is an easy way to automatically re-arrange the blocks.

  • Move the mouse pointer to any part of the white space outside the blocks
  • On Windows, right-click the mouse button
  • On Mac OS X, press Ctrl and click the mouse button

Continue reading Blocks Editing Tip: Arranging and collapsing blocks in the editor

Pevest App Inventor web site now features Google Translate: Translate into many languages!

Interest in MIT App Inventor is growing rapidly, world wide. Many of the readers of this web site do not speak English as their native language.

To help you use the tutorials on this web site, please use the new Google Translate option in the column on the right side of every page.  Select your language and this page will be automatically translated.

My native language is English. I speak a little Spanish that I learned when I was much younger, in high school. I expect to begin reviewing Spanish and improving my Spanish skills soon.