A (175)

(Tuis.) #1

58 CHAPTER 2: Configuring Your Android App Development System


Digital Audio: Adding Audio Media to Your Apps


In Chapter 12, we will look at the digital audio type of new media asset, which is the most well-
supported type of new media in the Android OS, as far as file formats (codecs) are concerned.


You will build on your knowledge of the MediaPlayer classes that you gained in Chapter 11, as
playing back audio files is quite similar to playing back video files, without the moving imagery, of
course. We will also take a look at the more advanced Android SoundPool class, which is more
suited to adding sound effects to an application as well as sequencing and mixing audio with an
application, as well as the SparseIntArray class.


As an added bonus, in Appendix A we will look at the foundational concepts behind digital audio,
as well as the plethora of different digital audio file formats (also known as codecs) that are
supported in Android.


We will look at how the codec usage scenarios will differ significantly from each other. We will
discuss different audio codec strengths and weaknesses, and which are the preferred ones to use
for a given Android application, and discuss why you will want to use certain digital audio formats
over the others that are available.


Services: Adding Background Processing to Apps


In Chapter 13, we’ll take a look at the Android Service class. Services in Android are used to provide
background processing, which is used when you want something done in the background (such as
playing music) while your user works on something else using your app’s Activity and its UI design.


To really give you a good feel as to what the Service class is doing, we will also have to cover some
fairly complex OS concepts such as Processes, Threads, and Scheduling. Threads can be a very
advanced area within any OS, and Android is no different, as Android is based on an open source
Linux OS Kernel, as well as on open source Java, XML, CSS, HTML5, WebKit, and OpenGL.


We will look at the Android Service-related classes, as well as how to use Intent objects to
create and control Services, which are launched and then operate in the background at the same
time that your user is interfacing with your UI design (the UI layout and its UI widgets) in your
Activity class. An Android app may never need to utilize the Service class, but it’s part of our
comprehensive coverage.


Content Providers: Accessing Stored Data Inside of Your App


In Chapter 14, we will look at the Android concept of Content Providers, which are “data stores” for
the Android OS. These provide data to your application, and include things such as files on your SD
card or an internal database.


The Android OS includes a popular open source database called MySQLite, which is the “Lite”
or very basic version of the popular open source MySQL DBMS (DataBase Management System)
relational database engine.


We will look at all of the different ways to provide data to an Android application, and we will take a
closer look at the theory behind databases. We will revisit those concepts of the URL and the URI,
which you will have utilized in Chapter 11 on digital video new media assets as well as in Chapter 12
on digital audio new media assets.

Free download pdf