Program the App Behaviour

What will your phone say?

Step 1

To start programming the behaviour of the app, go to the Blocks editor. 

From the Blocks palette, click the Button1 drawer to open it. Drag and drop the when Button1. Click block onto the Viewer.

Step 2

  • Click on the TextToSpeech1 drawer
  • Drag out the call TextToSpeech1.speak block
  • Snap it to the "do" section of the when Button1.Click block

This is the command block that will make the phone speak when the button on your app is pressed.

Step 3

Now you need to tell the TextToSpeech.Speak block what to say. Click on the Text drawer, drag out a text block and plug it into the empty message slot. 

Click on the text block and type in any phrase you like.

Step 4

Now test it out!