Friday, 22 January 2016

Running App Inventor on a Tablet

While the usual setup is to build apps on a PC and then download them to a simulator or Android device for testing, it is also possible to use App Inventor in a browser running on a tablet, building and testing apps on the same device. However, the smaller screen and touch interface can make this challenging:
  • On the Designer screen, instead of dragging a component onto the Viewer, 'long-click' to the right of the name of the component to select it (press until the highlight disappears), then click on the Viewer where it is to be positioned. Changing the order of the components on the Viewer works essentially the same way: click the component once to highlight it, then long-click to select it for moving, then click in its new position. Both of these operations are tricky to do initially, even when the display is zoomed in, but with some practice can be done reliably.
  • On the Blocks screen, the code blocks are quite large relative to the screen size in landscape, but in portrait they're smaller and it's easier to get an overview of the program. To zoom in or out, pinch outside the Viewer area.
  • To build the app, use the build APK for download option and the app will be downloaded and installed on the tablet directly.

In short, not a recommended approach, but workable if there are no other options.

Thursday, 21 January 2016

Course Consolidation

The Smart Skills course on the Unity DCU website has been consolidated to display each project on a single page (Introduction, Core 1, Core 2, Core 3) instead of the week-by-week structure previously used. This better reflects the fact that individuals and groups will progress through the material at different rates, for any number of reasons. There is no change to the deliverables, videos or resources associated with each project, and bookmarks or links to the previous week-by-week pages are redirected to the appropriate project page.

Friday, 8 January 2016

Additional Resources

Project Notes and Extra Challenges have been added to the Core 3: Project Management project, to provide additional insight into the workings of the app, and suggestions for further development:

The version of the app developed in the lesson plans has been added to the Smart Skills section of the App Library, and a version including some of the extra challenges has been added to the UniTY section of the library.

Thursday, 7 January 2016

Core 3: Project Management Updates

The videos for Core 3: Project Management have been reviewed and very minor edits made. There is no change to the instructional content, so there is no need to revisit videos that students have already viewed. The old versions of the videos are now marked private.

The downloadable AIA file SimpleBowling_example.aia has been updated to add missing images and to prevent the app from crashing when the game is played. It therefore differs from the code shown in video 4 as follows:
  • add a bowling pin image to the TitleSprite on the home screen so that the sprite is visible
  • set the Speed of the sprite in the TitleMove procedure (the Interval is set by default) to make it move
  • add bowling pin images to the remaining PinSprites on the play screen
  • set the Ball speed to a multiple of the Flung speed for more realistic movement
  • add handling for a collision with the BallSprite to the PinCollide procedure, because a Ball sprite cannot be referenced with an Any ImageSprite block
  • set the Speed and Heading of the ball and pin sprites to zero in the ResetPins procedure to stop them from moving and 'stand the pins up' ready to play again
This is the minimum set of changes needed to get a working game. There is ample scope for enhancing this app, even beyond the fourth and fifth deliverables mentioned in the lesson plans; this will be the subject of a future post, with a sample app to follow.

Monday, 21 December 2015

Modular Arithmetic with Mr. Spock

An important aspect of programming is to consider a program’s requirements in terms of computational effort and memory usage: an algorithm that makes efficient use of resources can help make a program robust and scalable.

Deciding the winner in Rock Paper Scissors Lizard Spock could be done with a brute force walk through the rules to find a match, but we can design an efficient modular arithmetic solution instead. Mr. Spock would approve.

Thursday, 17 December 2015

Connecting with Bluetooth

Bluetooth is a short-range wireless communication protocol supported by most mobile devices, and available for use in App Inventor. Two new apps have been added to the UniTY section of the App Library, one that demonstrates a Bluetooth connection and data transfer between two devices, and one that uses it in a two-player game:
  • BluetoothDemo - establish a client-server connection between two devices and exchange data
  • LizardSpock - an extension of Rock-Paper-Scissors, made famous in The Big Bang Theory

Note that Bluetooth must be enabled and the devices paired before running the apps. On most devices, Bluetooth configuration can be found at Settings - Wireless - Bluetooth.

Friday, 11 December 2015

Additional Resources

Three new apps have been added to the UniTY section of the App Library, including two that serve as reference implementations of interfaces with media and sensor features:
  • HelloWorld - a minimal Hello World app, using the fewest elements possible
  • MediaDemo - explore the media capabilities of your device (and see responsive design in action)
  • SensorsDemo - explore the sensor capabilities of your device

Project Notes and Extra Challenges have been added to the Core 2: The Brainstormer project, to provide additional insight into the workings of the app, and suggestions for further development:

Links to additional sources of demonstration apps and reference material have been added to the Starter Apps document:
  • link to Mini Golf app on the App Inventor website
  • link to tutorial library on the App Inventor website
  • link to online book and tutorials on appinventor.org