Tuesday, 16 August 2016

Raspberry Pi and App Inventor

We have uploaded a selection of apps and accompanying Python files to the App Library which demonstrate how App Inventor can be used to build apps that interface to a Raspberry Pi. Examples include controlling LEDs, reading sensors, driving a robot, and viewing webcam images. There's also a multifunction app that combines all of these and adds speech synthesis for full remote control of a Raspberry Pi robot.

Friday, 5 August 2016

Coding: Next Steps

For teachers or students interested in growing their software development skills beyond the contents of the Smart Skills course, there are any number of paths to follow. This document lists some popular sources of further training, but is by no means exhaustive.

Wednesday, 27 July 2016

Chrome Portable and ARC Welder

Some schools may not be able to install ARC Welder from the Chrome Web Store as described in the instructional videos because of computer or network security restrictions. While we will assist schools to investigate and attempt to resolve these issues, we are also making an alternative installation method available.

This involves copying a version of Chrome Portable with ARC Welder already installed and configured onto each student PC. Since this only requires copying files onto the PC, it can be done without administrator rights. 
  1. Download the zipped archive here, and extract the contents. It may be convenient to copy the unzipped folder to a USB drive in order to install it on multiple PCs.
  2. Copy the entire folder called 'GoogleChromePortable' to the root of the C: drive on the target PC. It is important not to rename the folder or copy it to any other location, as the configuration of ARC Welder depends on this location.
  3. Create a shortcut on the desktop to this copy of Chrome Portable: in the C:\GoogleChromePortable folder, right-click on the shortcut 'Chrome for Smart Skills' and choose 'Send to Desktop (create shortcut)', or drag it to the desktop.
  4. On the desktop, double-click the newly created shortcut to open Chrome Portable. Click on the Apps bookmark to find ARC Welder. For convenience, the bookmarks bar also contains links to App Inventor and the Smart Skills Student Resource Centre.
Note that this installation of Chrome Portable can co-exist with a normal installation of Google Chrome, so it is important to distinguish between the two when students are opening a browser to begin a lesson.

Wednesday, 22 June 2016

MIT App Inventor Update

An update to MIT App Inventor was pushed out on 16 June, and users will see a pop-up screen alerting them to this on their first sign-in after that date. None of the updates described in the release notes should have an impact on existing Smart Skills apps. The new Pedometer component may be of interest for the development of exercise and fitness apps.

If you have installed the AI2 Companion App on an Android device in order to use the WiFi or USB 'live debug' methods, it will need to be updated to use the new features in this App Inventor release. If you installed the Companion App from the Google Play store, it will update automatically; if you installed it directly to your device, you will need to manually update to version 2.37 at appinv.us/companion.

Friday, 17 June 2016

Nox App Player

We are investigating Nox App Player as an alternative to ARC Welder for PC-based testing of apps built with App Inventor. Nox is an Android 4.4.2 emulator, allowing Android apps to be run on a PC.

The installer is just over 250MB and can be downloaded from http://en.bignox.com/. Installation requires Administrator privileges, and an email address is requested though appears not to be used. Installation and startup is a little slow. Nox recommends that virtualisation (VT-x) is enabled in the computer BIOS to improve performance, but this is not required and the emulator performs well without it.

To test an app with Nox, build and save the APK file in App Inventor as usual. The APK file can be dragged and dropped onto the Nox emulator, or there is a Load APK button in the vertical control panel to the right of the emulator. Once installed, apps are retained in the emulator until manually deleted. Switching between landscape and portrait orientation requires Nox to be restarted.

Friday, 15 April 2016

BlueStacks App Player

We are investigating BlueStacks App Player as an alternative to ARC Welder for PC-based testing of apps built with App Inventor. BlueStacks is primarily intended as a games platform, allowing Android games to be played on a PC or Mac and streamed live if desired.

The installer is just over 300MB and can be downloaded from http://bluestacks.com/. Installation requires Administrator privileges. Some apps are installed automatically, though most of the apps shown in the channels are links to the App Store. * There is no need to connect a Google account in order to test APKs, so the One Time Setup tab can be closed. ** The BlueStacks TV window opens every time BlueStacks is started; it can be closed or ignored.

To test an app with BlueStacks, build and save the APK file in App Inventor as usual. Double-click the APK file to install it in BlueStacks, or click the APK icon in the control panel and select the file. (If your browser is configured to open a dialog box for downloads, APKs can be installed directly to BlueStacks without saving them first). Installed apps appear on the Android tab; click on All Apps in the Recently Played section to see newly installed apps. Apps can be switched between landscape and portrait by clicking the rotate icon at the top of the control panel. Usually this will close and restart the app in the new orientation, though it may need to be manually restarted. To overcome this, the ScreenOrientation property of Screen1 in App Inventor should be set to Portrait when creating the app.

BlueStacks includes a browser app; it is therefore possible to use App Inventor within BlueStacks, though the emulated screen resolution of 1280x720 is not ideal, and it may not be as responsive as a native browser. Build and download the APK as normal, then 'swipe' down with the mouse on the download notification indicator to install.

Online reviews indicate that the free version of BlueStack may install additional apps automatically from time to time. A thorough review of the licensing terms has not been conducted at this point.

* Update, 8th September 2016:
The latest version of BlueStacks (2.4.44) requires the user to log in to Google during the initial setup. This was previously optional, with a One Time Setup screen being displayed from time to time: that screen is now gone, as is the Welcome screen, with the result that the new setup procedure is more predictable and the overall user experience is cleaner. Performance and stability have also been improved steadily over the last few months.

* Update, 23rd June 2017:
The latest version of BlueStacks (2.7.320) has a more conventional tablet-like appearance than earlier versions, and BlueStacks TV is no longer automatically launched on startup.

Note: The Google account is not logged out when BlueStacks is closed, so users should consider manually disconnecting their Google account when using BlueStacks on a shared machine: go to Settings - Accounts - Google and select Remove account from the dropdown menu in the top right. Alternatively, a school may choose to create a dedicated Google account for use with BlueStacks, and leave that account logged into all instances of BlueStacks. Students would still use their individual Google accounts with App Inventor.

Thursday, 14 April 2016

Coding: Best Practices

It is important when writing software, in any language, that attention should be paid not only to the correct functioning of the code, but also to how the code is written and organised. Well written code is easier to understand, debug, maintain, enhance, and test. This can make or break a team software development project, and great emphasis is placed on adherence to coding standards and best practices in software design. It is equally important for solo developers who share their code with an Open Source community, or even when returning to one’s own code written some time in the past.

This document contains some guidelines which may be useful when programming with App Inventor, and which represent practical implementations of widely accepted programming principles.