Chapter 3: SounDroid: Creating an Android Sound Machine

In This Chapter

• Uploading and using media files in App Inventor

• Playing and looping sound files

• Arranging and placing user interface elements where you want them

In the previous chapter, you walked through the process of creating your design goals, primitives, and process. in this chapter, you take all of that from the previous chapter and put it into play. I also walk you through several complex algorithms.

Take special note of the method for placing and centering user interface elements on the screen. You need to reuse this method for almost any project you create. Creating user interfaces in App Inventor can be frustrating until you master the method of using invisible padding elements to adjust visible elements on the screen. You can use invisible labels or arrangements as “pusher” elements to center or move elements. I show you how to use the Fill Parent method to center components. However, remember that you can set the invisible padding components to a specific width and height to specifically place a visible element.

The use of the Clock element in this project is as both a timer and a way to mark passage of time. Take special note of both uses. The Clock component is a chameleon component that can be used for many things. You can use the method employed in this chapter to create wait states, pauses, and delay processing (more on delayed processing in a later project.)

Creating SounDroid 2.0

Your expansion ...

Get App Inventor for Android: Build Your Own Apps — No Experience Required! now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.