Wednesday, May 28, 2014

App Inventor 2 - Translation Component

In a previous post I talked about the new Yandex.Translate component that we added to App Inventor 2 about a week ago. In this video you can see how to use it.

Make sure you don't tamper with the Yandex note in the About this App Screen as it is a design requirement stated in the terms of use of the Yandex.Translate service.

Monday, May 26, 2014

Breaking changes for DatePicker in App Inventor 2

We've decided to to push a breaking change to our production server, which is something we very rarely do. The reason was that some Java style thinking leaked into one of the components, the DatePicker.

When I wrote that component I was obviously thinking about something else, and I broke one of the most distinctive abstractions that we use in App Inventor: all our sequences are 1-based and not 0-based. Newcomers to programming find this a lot easier to grasp. Because Java returns month numbers on a 0-based array, I went with that and our Month attribute returned 0 for January and 11 for December.
Because the component has not been out for long, we have decided that it's better to change it now and take the heat than leaving this leaked abstraction hurting our users.

More info in this announcement in the forums, and I've added an annotation to the video and post. This break will only affect you if you are still working on an app that uses this component, or if you want to upgrade an app that you programmed in the last week, and you were using some type of correction to counteract the fact that the sequence was 0-based. Otherwise, it should not affect you (we are hoping this affects to only a few developers).

Apologies for this breaking change; it is something that should never happen (again!).

Saturday, May 24, 2014

Note for developers about the new translation component in App Inventor 2

We have recently added a translation component based on the Yandex.Translate service.

This service needs an API key to work, and as you can imagine, we have not pushed that into the repo. In fact, we cannot circulate that key, so if you are creating your own distribution of App Inventor or simply running your own server from the MIT repository, you will have to add that key to the source code before you compile the system.

This is an easy thing to do; once you have created a Yandex account, you can request a key. After that, paste that key in the component.

  public YandexTranslate(ComponentContainer container) {

    // Set up the Yandex.Translate Tagline in the 'About' screen

    // TODO (user) To provide users with this component you will need to obtain
    // a key with the Yandex.Translate service at
    yandexKey = "";
    activity = container.$context();

The place to paste it is in the yandexKey string available in the constructor, as shown in the code above. The instructions in the TODO are rather explicit.

And that would be all if you think that all your users will not generate enough traffic to go over the limits of a particular key. If that is not the case, I would recommend to modify the component to allow your users to add their own keys when creating apps. This is what we do in some other components such as Twitter or FusionTables.

Also note that this component, when being used, adds some information to the About screen in the app:

This is a design requirement that is mandatory to use the service. If you decide to tamper with that, or you have disabled the About screen, I would recommend to find another solution to keep this requirement or you will be breaching the terms of use for the service.

Monday, May 19, 2014

App Inventor 2 Spinner component

A Spinner in Android provides a quick way to choose from a set of options. We have added a Spinner to App Inventor 2, and it's super easy to use. Have a look at the following video to find out how.

App Inventor 2 ListView component

The existing ListPicker allows to generate a series of choices to let the user decide which one to choose; for this, it creates a new Screen (or activity). The new ListView component works in the same way, with an almost identical API, but it does not create an additional screen, so you can embed your data within the Screen you are working on. The following video explains the basics of ListView in App Inventor 2.

Date and Time pickers in App Inventor 2

IMPORTANT UPDATE: There has been an upgrade to the Component and now it returns 1 = January and 12 = December for the Month property.

We have added two very simple widgets to App Inventor 2 (note they won't be added to App Inventor 1, but if you cherry pick the commit to the AI1 branch, it should work too). Date picker and Time picker are really easy to use, as you can see in this video:

Sunday, May 18, 2014

MIT App Inventor: Enabling Personal Mobile Computing

A few months ago Shay Pokress and I submitted a paper for the PROMOTO2013 workshop at SPLASHCONF13. The paper got accepted and I got to go to Indiana to do a tool demo for App Inventor and present a poster too. This is the slide deck used at the conf:

Saturday, May 17, 2014

App Inventor - Related Research

This is another slide deck from an MIT 6.S198 lecture, this time about EdTech in general, and more specifically about the many research influences that App Inventor and other similar systems share.

If you want to know more about the class, feel free to browse (and use, reuse, redistribute, improve, and so forth!) the materials linked from the class' calendar.

Friday, May 16, 2014

JavaScript for Developers @MIT 6.S198 - Fall 13

As part of the App Inventor class we run last semester at MIT, I prepared (or I should say rehashed, cause I had used this same material before for training) this presentation about JavaScript for developers familiar with other programming languages.

If this is of interest to you, you can consult the calendar and all materials for the class here.