Ding-dong! You have a message!

Say, we are building an application for the sales force which allows them to look at the orders placed in the ERP system from their touch device. Moreover, you want to notify the user by playing a notification sound as soon as a new order arrives in the system. This can be achieved by using the audio component which is provided by Sencha Touch and in this recipe. We will see how to use the audio component to play a sound.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch07_02.js and paste the following code into it:
    Ext.setup({ onReady: function() { var pnl = new Ext.Panel({ ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.