Tag Archives: mit app inventor

App Inventor course available in Spanish

Estructurado en 8 módulos y con más de 146 clases este curso es ideal para aquellas personas que, sin tener idea de programación, quieren tener un curso completo de App Inventor paso a paso y basado en la metodología de aprender haciendo.

Curso de Desarrollo de aplicaciones móviles Android con App Inventor

The 22 hour online course is offered through the udemy.com

(I did not make clear – sorry – this course is from Professor José Luis Núñez and he is offering it through udemy.com. I am not involved in this at all – just sharing the link – Ed)

App Inventor introduces copy and paste of code blocks!

App Inventor has introduced “copy and paste” of code blocks. Now you can copy blocks of code within a current screen, or from one screen to another screen, or even between projects. This is great news!

Look for the “backpack” icon at upper right of the blocks Viewer screen:

AI_Copy1

Select a block or blocks with the mouse pointer, and then click and drag the selected blocks into the backpack. A copy of the blocks are placed into the backpack and your original blocks also remain in the editing window.

Click on the backpack icon and it displays the code blocks currently stored in the backpack:

AI_Copy2

Click on the code block in the backpack (at right) and drag it into the Blocks Viewer. That is all you need to do to copy blocks.

Use this feature to copy blocks within your current screen, or to copy blocks from one screen to another screen, or to copy blocks from one app to another app.

You can put several blocks into the backpack, and then select only the ones you wish to copy over to another blocks Viewer.

How do you empty the backpack? It seems the only way to empty the backpack of saved items is to close the editing windows, go back to the MIT App Inventor home page (http://appinventor.mit.edu/) and select the Create apps! button to re-enter the designer and blocks editor.

Regardless, this is a GREAT NEW FEATURE! Thanks MIT App Inventor team!

Implementing an “Array” in App Inventor

What is an “Array”?

An array is a variable data type that stores a collection of values referenced by an index number.

For example, suppose we wished to store the names of the 12 months of the year: January, February, March, … , November, December so we can convert a month number to a text name. Month 1 converts to “January”, Month 2 converts to “February” and Month 12 converts to “December”.

An easy way to do this conversion is to set up an array that, in concept, looks something like this:

Month[1] = “January”
Month[2] = “February”
Month[3] = “March”
Month[4] = “April”
Month[5] = “May”
Month[6] = “June”
Month[7] = “July”
Month[8] = “August”
Month[9] = “September”
Month[10] = “October”
Month[11] = “November”
Month[12] = “December”

Month is the name of this variable – but unlike other variables, this one stores 12 separate values. Each value is referenced by using an index – if the index value is 2, then Month[index] refers to “February”.

If we have a date, such as (US-style) – 2/14/15, meaning February 15, 2015, we can convert the month number of 2, into the text month name by referencing Month[2].

If you have studied algebra math or beyond, you have encountered array variables such as X1, X2, X3, … Xn where the value Xi is read as “X subscript i”. This is the same concept as an array of values. If you have not studied algebra, this notation may be new to you. 

Most programming languages support an array variable type but App Inventor does not support arrays. Yet arrays are a convenient way of storing and working with some types of data. To support an array-like variable in App Inventor, we can use a list and map the array subscript to an index position in the list.  By hiding this within a couple of procedures, we can simulate the array variable type.

Sample User Interface

I created a simple app to demonstrate the use and implementation of the array. You can download this app from the MIT App Inventor Gallery here.

Continue reading Implementing an “Array” in App Inventor

MIT begins testing “App Inventor Extension Components”

MIT has begun testing a new App Inventor feature that will enable developers to create their own “extension components”. Extension components are written in Java. Once created and tested, these new components may be shared with other App Inventor developers for use in programs.

What this means: if App Inventor lacks a feature or capability, then a Java developer familiar with App Inventor and its components software development kit will be able to add new features to App Inventor. Over time, the capabilities and power of App Inventor are likely to grow enormously – and rapidly. The ability to extend App Inventor’s features/components is an exciting and tremendously important development for the future of App Inventor!

For now, this feature is in “test mode”.

Source: App Inventor Extension Components available for testing | Explore MIT App Inventor

Is there a good way to print App Inventor blocks code?

I do not think there is any good way to make print outs of the App Inventor blocks code.

What I do is:

In Windows 7 (also works in Vista and newer version) is to use the Snipping Tool to select a section of blocks code on screen, copy the selection, and then paste that into a Word document. I make several “snips” as needed, to capture all of the code, and paste each into the document. Then I print out the document.

Is there a better way? I do not know but if you have a better solution, let us know in the comments! Thanks!

App Inventor Stores Numbers as “Floating Point” Format

When you type a number, such as “123”, computers convert the text values of “123” into an internal representation used by the computer. There are many possible ways that numbers can be represented inside a computer. For example, the computer could:

  • keep numbers in their original text format “123” (decimal format)
  • convert them into a binary representation (binary integers)
  • a “floating point” representation (floating point or “float” format)
  • or even a “binary coded decimal” (BCD) representation.

Each internal format has benefits and drawbacks, depending on the application. Most computers (and programming systems) convert entered numbers from their original text format into either integer format or floating-point number format.

App Inventor converts values to floating point format. Which is fine, except that you will encounter some odd and subtle issues. As the link below notes, in App Inventor arithmetic, 0.3 + 0.6 does not equal 0.9!

Continue reading App Inventor Stores Numbers as “Floating Point” Format

Google to end support of Eclipse for Android s/w development

I posted the following on my App Inventor Facebook page – only a fraction of readers use the FB page so I am cross posting back over this blog. Usually I post items on the blog first, and then those end up on FB.

If you would like to follow the Facebook page, click here and then click on Like and also select “Get Notifications”.


Google will end support for Android Software development using the Eclipse Integrated Development Environment as they migrate development over to Google’s own Android Studio.

See here for details: http://www.androidcentral.com/google-stop-development-and-support-android-developer-tools-eclipse

This does NOT impact MIT App Inventor coders!

Eclipse and Android Studio are used for developing Android apps written in the Java programming language, and relying on the Android Software Development Kit of libraries of code. These tools are used to develop most Android apps as they are capable of using all of the features provided by Android, while MIT App Inventor limits us to a subset.

I just spent several days getting Android Studio up and running and reconfiguring an old project so that it now builds entirely in Android Studio. That Eclipse will be going away was sort of obvious.

———-

I have completed all of the text for my next App Inventor e-book. However, once I finished, I decided to add even more! I am hard at work on one more chapter! I think a lot of people are going to love Volume 3 and I cannot wait to share it with you! However, its the middle of summer and my wife would like us to take an actual vacation so I need to work hard on my vacation skills for a few days before I can wrap up the book!

I hope to share a lot more with you in very early August.

New App Inventor 2 “Companion” app released today; new features

Changes between nb143i and nb144 (June 30, 2015)

  • When a component is renamed in the designer, any related collapsed blocks will be properly renamed now.
  • Screen1 now has properties that permit you to hide both the top “Status” and “Title” Bars
  • The selected item in a ListView is now highlighted
  • Activity Starter component now has a “Activity Canceled” event
  • Fix to the Player Component so it doesn’t spontaneously start playing after a phone call or other interruption
  • Bugfix to Image Sprite rotation which had left screen artifacts on some devices
  • Add Math blocks to convert between decimal, Hexidecimal and Binary representation
  • Clock Component now permits you to format a date or time arbitrarily. You provide a “format string”
  • You can now have both a Background Image and a Background Color and the “right thing” happens
  • TextToSpeech: The designer now uses dropdown menus to select Country and Language. Added blocks to fetch the supports countries and languages on a given device

Source: Release Notes for MIT App Inventor 2 (Beta)