A (175)

(Tuis.) #1
CHAPTER 13: Android Service Class and Threads: Background Processing 503

Summary


In this chapter, you learned about the Android Service component subclasses as well as about
processing concepts, principles, prioritization, and optimization. You learned about Thread objects
and how these threads differ from Service components.


You learned all about different types of Android Services, including started Services, bound
Services, and a hybrid between these two Service types, as well as about characteristics of
Services, caveats about using Services, and when to utilize a Service subclass versus using a
Thread object.


You learned about processes as well, and how to spawn your own process in your
AndroidManifest XML file. You learned how to assign different application components to their own
processes, by using the android:process parameter inside of your parent tag or its
child component tags, such as , , , or .


You created your own Service subclass called AmbientService to start a MediaPlayer object (and
stop it) so that you could play ambient planet background audio effects while your digital video was
looping. Then you created a new UI for your PlayVideo Activity to hold some audio control icons, and
then wrote Java code that called the Service subclass from the PlayVideo Activity subclass using
the startService and stopService methods.


In Chapter14, you will learn all about Content Provider classes in Android, which is an advanced
area that includes database technology. I saved the most complicated chapter for last. As you can
see, I am as always trying to cover things in the most logical, optimal fashion, as you progress
through this journey to learn Android.

Free download pdf