Android apps for absolute beginners, 3rd edition

696 180 0
Android apps for absolute beginners, 3rd edition

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

s de clu I n id o dr An L( Android Apps 0) Get started with building your very own Android apps for Absolute Beginners THIRD EDITION Wallace Jackson www.it-ebooks.info For your convenience Apress has placed some of the front matter material after the index Please use the Bookmarks and Contents at a Glance links to access them www.it-ebooks.info Contents at a Glance About the Author��������������������������������������������������������������������������������������������������������������� xxi About the Technical Reviewer����������������������������������������������������������������������������������������� xxiii Acknowledgments������������������������������������������������������������������������������������������������������������ xxv Introduction�������������������������������������������������������������������������������������������������������������������� xxvii ■■Chapter 1: Setting Up Your Android App Development System�����������������������������������������1 ■■Chapter 2: Configuring Your Android App Development System�������������������������������������33 ■■Chapter 3: An Introduction to the Android Application Development Platform���������������61 ■■Chapter 4: Introduction to XML: Defining an Android App, Its Design, and Constants�����101 ■■Chapter 5: Introduction to Java: Objects, Methods, Classes, and Interfaces����������������131 ■■Chapter 6: Android Screen Design: Writing to the Display Using Activity and View�����167 ■■Chapter 7: Making Apps Interactive: Intents, Event Handling, and Menus��������������������213 ■■Chapter 8: Android UI Design: Using Advanced ViewGroup Layout Containers�������������259 ■■Chapter 9: Android Graphic Design: Making Your UI Designs Visual�����������������������������301 ■■Chapter 10: Android Animation: Making Your UI Designs Move������������������������������������353 ■■Chapter 11: Digital Video: Streaming Video, MediaPlayer, and MediaController classes������������������������������������������������������������������������������������������������399 v www.it-ebooks.info vi Contents at a Glance ■■Chapter 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool ���������������������������������������������������������������������������������������������������������������������447 ■■Chapter 13: Android Service Class and Threads: Background Processing�������������������475 ■■Chapter 14: Android Content Providers: Providing Data to Applications ���������������������505 ■■Chapter 15: Developing for Android Wearable Devices ������������������������������������������������551 ■■Chapter 16: The Future of Android: The 64-Bit Android 5.0 OS�������������������������������������591 ■■Appendix A: Audio Concepts, Terminology, and Codecs �����������������������������������������������651 Index���������������������������������������������������������������������������������������������������������������������������������665 www.it-ebooks.info Introduction The Android OS is currently the most popular operating system in the world The Android OS runs on everything from smartwatches to HD smartphones to touchscreen tablets to ebook readers to game consoles to smartglasses to ultra-high definition interactive television sets! There are even more types of consumer electronics devices—such as those found in automotive, home appliance, security, robotics, photography, industrial and home automation markets—that are adopting the open source Android OS as their platform as time goes on This book will show you how to develop applications for these new device type verticals as they emerge into the market Since there are literally billions of Android consumer electronics devices owned by billions of people all over the world, it stands to reason that developing great Android applications for all these people might be an extremely lucrative undertaking, assuming that you have the right concept and design This book will help you go a long way toward learning how to develop Android applications that will run across all types of Android-compatible consumer electronics devices, and across all popular versions of the Android OS, most recently the 32-bit Android OS and the new 64-bit Android OS Developing an Android application that works well across all of these types of consumer electronics devices requires a very specific work process, which I cover in this book I wrote Android Apps for Absolute Beginners, Third Edition from scratch, targeting those readers who are absolute beginners to Android yet are technically savvy, but who are not familiar with computer programming concepts and techniques Since 32-bit Android is currently using Version 4.4.4, this book will be more advanced than Android Apps for Absolute Beginners, First Edition, when Android OS Version 1.5 was released by Google for smartphones, or Android Apps for Absolute Beginners, Second Edition, when Android OS Version 3.0 was released for tablets Since then, five revisions of the 32-bit Android OS Version 4.x have been released, including 4.0, 4.1, 4.2, 4.3, and 4.4, targeting all new iTV set and game console products xxvii www.it-ebooks.info xxviii Introduction Since the 64-bit Android 5.0 OS was announced during the writing of this book, and is currently in beta, I will also include an advanced chapter at the end of this book called “The Future of Android: The 64-bit Android 5.0 OS.” This comprehensive Android 5.0 chapter will cover what you can expect when 64-bit Android 5.0 smartphone devices are released during 2014, as well as when 64-bit Android 5.0 game consoles, tablets and iTV sets are released during 2015 and into 2016 The first edition of this book was a mere 300 pages, as Android 1.5 was the first version to appear on Android hardware devices (smartphones), and a second edition of this book was 33% longer, at 400 pages I’ve expanded this version of the book to include nearly 700 pages of information, the size of the first two editions combined This third edition even contains chapters that cover how to develop for Android wearable devices, such as the popular Neptune Pine smartwatch, as well as covering the new Android Wear SDK using the new Android Studio and IntelliJ IDEA This book also covers how to develop for rapidly emerging Android appliances using the new Android TV SDK I designed this book to be a more comprehensive overview of the Android application development work process than most beginning Android application development books, because, at this point, there is really no way to “sugar coat” the Android application development process To become the leading Android application developer that you seek to become, you will have to understand, as well as master, XML mark-up, user interface design, Java programming, and new media content creation Once you have done this, hopefully by the end of this book, you will be able to create the vanguard user experiences required to create those popular, best-selling Android applications Android apps are currently developed for 32-bit Android with Eclipse ADT Integrated Development Environment (IDE) or for 64-bit Android using IntelliJ IDEA Android applications are not developed via IDE alone, but also in conjunction with several other genres of new media content development software packages For this reason, this book covers a wide variety of popular open source software packages, including GIMP 2.8, Planetside Terragen 3.1, Sorenson Squeeze Pro 9, VirtualDub 1.9, and Audacity These professional new media content production tools should be utilized in conjunction with developing your Android applications, and this book will show you exactly how to accomplish this, as well as how to download, install, update, configure, and actually use each of these programs This comprehensive Android 4/5 application development work process will allow you to experience exactly how the use of all of these multimedia content development software packages needs to fit into your overall Android application development work process This 100% comprehensive “soup to nuts” multimedia-centric Android app development approach sets this 32-bit Android 4.x and 64-bit Android book title distinctly apart from all of the other Android application development titles that are currently on the market This book covers the Android development process at a broader level Chapter starts by covering downloading and installing the current Java SE and Android 4.4 SDK as well as the Eclipse IDE and the Android ADT bundle, along with several popular open source content development applications In Chapter 2, you will configure your Android application development workstation, and in Chapter 3, you will create a basic Android 4.4.4 application You will be adding more and more functionality to that basic Android application during the remainder of the book, as well as converting it into an Android app during the final chapter of the book covering Android In Chapter 4, you learn all about the XML markup language, and in Chapter 5, you learn all about the Java SE programming language Thus, the first third of this Android book is foundational material, which explains how the Android OS works together as a whole In Chapters through 8, you learn about the fundamentals of user interface design in Android, and how to make UI designs interactive www.it-ebooks.info Introduction xxix In Chapters and 10 you will learn about graphics design and 2D animation in Android, and how to use new media content production software in conjunction with Android development software and IDEs In Chapters 11 and 12, you will learn how to implement digital audio new media assets as well as how to stream digital video new media assets from your remote video servers In the final four chapters of this book, you will learn about some of the more advanced development topics that normally would not be included in an Absolute Beginner title, but I included them so that all of the important topics regarding Android application development are in this one, single, unified book These included advanced topics including threads, processes and databases, developing apps for smartwatches and iTV sets, and everything you would want to know about the new 64-bit Android OS, including how to set it up, how to develop Android 5.0 applications, and all of its new features In Chapter 13, you will learn all about threads, Services and background processing for Android using the Service class, and in Chapter 14 you’ll learn about RDBMS database theory and SQLite databases in Android, as well as how to use the Android Content Provider classes to access built-in databases In the last two chapters in this book, you’ll dive into the future of Android application development, by developing applications for Android wearables and Android appliances, and learning all about Android 5.0 Chapter 15 covers how to develop Android applications for wearable devices and the Wear SDK, and Chapter 16 covers how to develop Android applications for Android appliances such as the iTV set using the Android TV SDK and the new Android 5.0 OS and Android Studio Bundle based on the IntelliJ IDEA and Java on top of an all new 64-bit Linux Kernel and the new ART Android RunTime This book attempts to be the most comprehensive Absolute Beginners book for Android application development out there, by covering most, if not all of, the major Android classes that will need to be used to create leading-edge 32-bit Android 4.x and 64-bit Android 5.x software applications Some of these classes include the View, ViewGroup, Activity, Menu, MenuItem, OptionsMenu, and ActionBar classes, used for GUI and screen designs, the FrameLayout, LinearLayout, RelativeLayout, GridLayout, TableLayout, and SlidingPaneLayout classes, which are used for user interface designs, the ImageButton, ImageView, NinePatch, NinePatchDrawable, BitmapDrawable, Animation, AnimationDrawable, and AnimationSet classes, which are used for graphics design and animation, the SoundPool, VideoView, MediaPlayer, Uri and MediaController classes, which are used in digital audio and digital video applications, and finally, the Service, Thread, Context, ContentProvider, and ContentResolver classes, used for database access and more complex background processing tasks If you are looking for the most comprehensive, up-to-date overview of the latest 32-bit and 64-bit Android OSes, including Eclipse ADT (Android Developer Tools) IDE on top of Java SE 6, and IntelliJ (Android Studio) IDEA on top of Java SE 7, this is the book that covers the entire gamut This Android title covers everything regarding the XML markup langauge and the new media content development work processes which spans across both 32-bit as well as 64-bit Android development, as well as detailed knowledge about how to optimally use Android app technologies with the leading open source new media content design and development tools www.it-ebooks.info xxx Introduction If you are looking for the latest Android title that covers everything about Android from the first version that Google released (1.5) up to the current version (5.0) and how to assilimate these app development technologies into your current content production workflows, this Android Apps for Absolute Beginners, Third Edition book will be of significant interest to you It is the intention of this book to take you from being an “Absolute Beginner” in Android application development, to having a comprehensive, solid, intermediate knowledge of both 32-bit Android 4.4 and 64-bit Android 5.0 application development You should be advised that this book contains a significant amount of technical knowledge and work processes that may take more than one read-through to assimilate into an application development knowledge base (your current Android knowledge “quiver of arrows” so to speak) This vast journey through 32-bit Android 4.x and 64-bit Android will be well worth your time, however; rest assured www.it-ebooks.info Chapter Setting Up Your Android App Development System These days, you see Android devices of every size and shape everywhere you look They can be worn on your person, used in an appliance, are a part of your car, or provide you entertainment in your living room taking the form of an iTV set, a tablet, eBook reader, or an Android game console In this chapter, we will explore some basic facts about the Android operating system (OS), to give you a high-level overview of the history of Android, the benefits of learning Android application development, and which open source programming languages and OSs Android is based upon We will also need to get all of the tedious searching and downloads out of the way regarding to how to go about obtaining all of the various software packages, SDKs, and components, which together form a comprehensive Android production workstation Even though this is an “Absolute Beginners” Android title, I want to teach you how to put together a pro Android development workstation, so that you are all ready to get into the various Pro Android series of books from Apress (after you finish mastering this book, of course) So that everyone experiences this book equally, this chapter will outline all the steps to obtain a completely decked out Android development workstation The History of the Android OS: Impressive Growth Android OS was originally created by Andy Rubin as an OS for mobile phones; this happened around the dawn of this 21st century In 2005, Google acquired Android Inc., and made Andy Rubin the Director of Mobile Platforms for Google Many think this acquisition of the Android OS by Google was largely in response to the appearance of Apple’s iPhone around that same time However, there were enough other large players, such as RIM Blackberry, Nokia Symbian, and Microsoft Windows Mobile, that it was deemed to be a savvy business decision for Google to purchase Android engineering talent and www.it-ebooks.info CHAPTER 1: Setting Up Your Android App Development System Android OS intellectual property, allowing Google to insert their company into this emerging market, which was known as Internet 2.0 Internet 2.0, or the Mobile Internet, allows users of consumer electronic products to access content via widely varied data networks, using portable consumer electronic devices These currently include tablets, smartphones, phablets (phone-tablet hybrid), game consoles, smartwatches, smartglasses, personal robots, and eBook eReaders These days, Android OS–based devices can also include those not-so-portable consumer electronics devices, such as iTVs, home media centers, automobile dashboards and stereos, and digital signage system set-top boxes This ever-growing Android phenomenon puts new media content such as games, 3D animation, interactive television, digital video, digital audio, eBooks, and high-definition imagery into our lives at every turn Android is one of those popular, open source vehicles (the other one being HTML5) that digital artists will increasingly leverage in order to be able to develop new media creations that users have never before experienced Over the past decade, Android has matured and evolved, to become a stable, exceptionally reliable, embedded open source OS An Android OS that started out with its initial Version 1.0 just a few years ago, once acquired by Google, has released stable OS versions at 1.5, 1.6, 2.0, 2.1, 2.2, 2.3, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, and, recently, the much-heralded KitKat Android version 4.4, currently at Version 4.4.4 As of the writing of this book, Android 5.0 is in beta at version 0.8.0, so that should show up in 64-bit Android devices in 2015 and 2016 If you want to see the latest statistics regarding each of these Android OS revisions, directly from the Android developer web site, visit this URL: http://developer.android.com/about/dashboards/index.html Table 1-1 shown this progression of all the popular versions of Android OS that have been installed on the popular consumer electronics manufacturer products over the past decades I wanted to collect all of this Android OS information together into one single infographic for you so that you could get a “bird’s eye” view of the current historic progression of the Android OS As you can see, there are certain Android market share “sweet spots.” Table 1-1.  Android Versions, Internal Codenames, API Levels and Market Share VERSION CODENAME API LEVEL MARKET SHARE 1.5 Cupcake 0.1% 1.6 Donut 0.1% 2.1 Eclair 0.2% 2.2 Froyo 0.2% 2.3.7 Gingerbread 10 14.9% 3.2 Honeycomb 13 0.2% (continued ) www.it-ebooks.info viii Contents Digital Audio Editing and Engineering: Audacity�������������������������������������������������������������������������������������������������� 24 Professional Digital Video Editing: EditShare Lightworks������������������������������������������������������������������������������������ 26 A Complete Business Software Suite: Apache OpenOffice���������������������������������������������������������������������������������� 29 Other Open Source Software������������������������������������������������������������������������������������������������������������������������������� 30 Summary�������������������������������������������������������������������������������������������������������������������������������������31 ■■Chapter 2: Configuring Your Android App Development System�������������������������������������33 Updating Eclipse ADT: Check For Updates!����������������������������������������������������������������������������������34 Configuring Eclipse: Android SDK Manager Repository���������������������������������������������������������������37 Android Virtual Devices: Creating the AVD�����������������������������������������������������������������������������������41 Creating AVDs: Android Virtual Device Manager�������������������������������������������������������������������������������������������������� 42 Creating an AVD from a Pre-configured Device Definition����������������������������������������������������������������������������������� 44 Creating an AVD from Scratch: Pine SmartWatch������������������������������������������������������������������������������������������������ 46 What Will Be Covered in this Book����������������������������������������������������������������������������������������������53 Introduction to Android Application Development Platform��������������������������������������������������������������������������������� 53 How Android Simplifies Design: Designing Apps Using XML������������������������������������������������������������������������������� 54 Android Application Framework: Java Programming Primer������������������������������������������������������������������������������� 54 Screen Real Estate: View and Activity Classes���������������������������������������������������������������������������������������������������� 54 Interactivity: Using Android Intent and Event Handling���������������������������������������������������������������������������������������� 55 UI Design: Adding User Controls to Your Apps����������������������������������������������������������������������������������������������������� 56 Graphics Design: Add Visuals to Your Apps���������������������������������������������������������������������������������������������������������� 56 Animation: Adding Motion Graphics to Your Apps������������������������������������������������������������������������������������������������ 57 Digital Video: Captive or Streaming Video for an Application������������������������������������������������������������������������������� 57 Digital Audio: Adding Audio Media to Your Apps�������������������������������������������������������������������������������������������������� 58 Services: Adding Background Processing to Apps���������������������������������������������������������������������������������������������� 58 Content Providers: Accessing Stored Data Inside of Your App����������������������������������������������������������������������������� 58 Android Wearables: Creating a Smartwatch Application������������������������������������������������������������������������������������� 59 Android Appliances: Creating an Android Appliance App������������������������������������������������������������������������������������� 59 The Future of Android: 64-bit Android 5.0����������������������������������������������������������������������������������������������������������� 59 Summary�������������������������������������������������������������������������������������������������������������������������������������60 www.it-ebooks.info Contents ix ■■Chapter 3: An Introduction to the Android Application Development Platform���������������61 How the Android Platform is Structured: Java, XML, and New Media on Top of Linux����������������62 Details Regarding Android’s Platform Structure�������������������������������������������������������������������������������������������������� 62 Compiled App: Runtime Executable Java Bytecode��������������������������������������������������������������������������������������������� 63 Android Runtimes: Dalvik VM������������������������������������������������������������������������������������������������������64 Android Runtimes: The Android RunTime VM������������������������������������������������������������������������������65 Creating Your First Android Application���������������������������������������������������������������������������������������66 Using Eclipse ADT to Create a New Android App������������������������������������������������������������������������������������������������� 67 Navigating Around an Android Project����������������������������������������������������������������������������������������������������������������� 75 Android Resources: Asset Project Folders�����������������������������������������������������������������������������������77 Android Drawable: Assets that Draw to a Screen������������������������������������������������������������������������������������������������ 78 Android Layout: Assets that Lay Out a UI Design������������������������������������������������������������������������������������������������� 80 Android Menu: Assets that Define Menu Options������������������������������������������������������������������������������������������������ 80 Android Values: Assets Defining App Constants�������������������������������������������������������������������������������������������������� 81 Android Anim: Assets Defining Tween Animation������������������������������������������������������������������������������������������������ 83 Android Animator: Asset for Property Animation������������������������������������������������������������������������������������������������� 83 Android Raw: Pre-Optimized Video & Audio Files������������������������������������������������������������������������������������������������ 83 Android XML: Arbitrary XML and Configurations�������������������������������������������������������������������������������������������������� 83 Creating a Custom App Launch Icon�������������������������������������������������������������������������������������������84 Creating a Launch Icon for Each Screen Density������������������������������������������������������������������������������������������������� 84 Creating Transparency: Edit the Image in GIMP��������������������������������������������������������������������������������������������������� 85 Creating Resolution Density App Launch Icons��������������������������������������������������������������������������������������������������� 91 Saving Your GIMP Composite: Native XCF Format���������������������������������������������������������������������������������������������� 96 Repeat the Work Process for the Lower Density Assets�������������������������������������������������������������������������������������� 97 Summary�������������������������������������������������������������������������������������������������������������������������������������98 ■■Chapter 4: Introduction to XML: Defining an Android App, Its Design, and Constants�����101 Extensible Markup Language: XML Overview���������������������������������������������������������������������������102 XML Naming Schema: Tag & Parameter Repository������������������������������������������������������������������������������������������ 103 XML Syntax: Containers, Brackets, and Nesting������������������������������������������������������������������������������������������������ 105 XML Referencing: Chain XML Constructs Together�������������������������������������������������������������������������������������������� 107 XML Constants: Editing Constants Using XML��������������������������������������������������������������������������������������������������� 108 www.it-ebooks.info x Contents XML Dimensions: Editing Dimensions Using XML��������������������������������������������������������������������������������������������� 109 XML Styles: Editing Styles or Themes Using XML���������������������������������������������������������������������������������������������� 110 Running Your HelloUniverse App: Using Your AVD���������������������������������������������������������������������������������������������� 114 Changing the App’s Theme using XML: HOLO Dark������������������������������������������������������������������������������������������� 118 Changing the App’s Theme using XML: HOLO Light������������������������������������������������������������������������������������������� 120 XML Menus: Designing Menus for Android Apps����������������������������������������������������������������������������������������������� 121 XML Manifest: Configuring the Android Manifest���������������������������������������������������������������������������������������������� 123 XML Application Structure: A Bird’s Eye View���������������������������������������������������������������������������������������������������� 124 Using the Eclipse Graphical Layout XML Editor������������������������������������������������������������������������������������������������� 125 Using Eclipse’s Graphical Manifest XML Editors����������������������������������������������������������������������������������������������� 127 XML Inflation: How XML Works with Java���������������������������������������������������������������������������������129 XML’s Role: Revisiting How Android Works��������������������������������������������������������������������������������129 Summary�����������������������������������������������������������������������������������������������������������������������������������130 ■■Chapter 5: Introduction to Java: Objects, Methods, Classes, and Interfaces����������������131 The Three Versions, or Editions, of Java������������������������������������������������������������������������������������132 The Foundation of OOP: The Java Object�����������������������������������������������������������������������������������133 OOP Terminology: Variables, Methods, Constants���������������������������������������������������������������������135 Java Constructs: Create Your Own Objects�������������������������������������������������������������������������������136 The Java Class: Java Code Structure Container������������������������������������������������������������������������������������������������ 136 The Java Method: Java Code Function Definition���������������������������������������������������������������������������������������������� 138 Constructor Methods: The Java Object Blueprint���������������������������������������������������������������������������������������������� 141 Instantiating Objects: The Java “new” Keyword������������������������������������������������������������������������������������������������ 143 Extend an Object’s Structure: Java Inheritance������������������������������������������������������������������������������������������������� 145 The Interface: Defining a Class Usage Pattern�������������������������������������������������������������������������������������������������� 147 Logical Collection of Classes: Using a Package������������������������������������������������������������������������������������������������� 149 The API��������������������������������������������������������������������������������������������������������������������������������������������������������������� 150 Modifiers: Data Type, Access, Inheritance���������������������������������������������������������������������������������150 Java Access Modifiers: Four Levels of Access�������������������������������������������������������������������������������������������������� 151 Non-Access Modifiers: Static, Final & Abstract������������������������������������������������������������������������������������������������� 153 Creating Your HelloUniverse Class: Galaxy��������������������������������������������������������������������������������156 Defining a Galaxy Class: Variables and Methods����������������������������������������������������������������������������������������������� 156 Coding the Galaxy Class: Variable Declarations������������������������������������������������������������������������������������������������� 157 www.it-ebooks.info Contents xi Coding Galaxy Objects: Constructor Method�����������������������������������������������������������������������������158 Creating Galaxy Functions: Coding Your Methods��������������������������������������������������������������������������������������������� 158 Creating a Java Class in Eclipse: Galaxy.java���������������������������������������������������������������������������������������������������� 160 Coding Your Galaxy.java Class with Eclipse ADT������������������������������������������������������������������������������������������������ 163 Summary�����������������������������������������������������������������������������������������������������������������������������������164 ■■Chapter 6: Android Screen Design: Writing to the Display Using Activity and View�����167 How Activity, View, and ViewGroup Relate���������������������������������������������������������������������������������168 The ViewGroup Class: A Subclass of View���������������������������������������������������������������������������������170 Customizing Your UI Design: Galaxy Screen������������������������������������������������������������������������������172 Eclipse Clean Project: Sanitizing Your Project��������������������������������������������������������������������������������������������������� 173 Using the Galaxy Class: Creating a Galaxy Object��������������������������������������������������������������������������������������������� 175 Using LinearLayout: Creating Linear UI Designs������������������������������������������������������������������������������������������������ 180 Using Digital Imagery: Adding a Galaxy Background����������������������������������������������������������������������������������������� 186 Creating UI Contrast: The TextView Color Parameter����������������������������������������������������������������������������������������� 189 Nested LinearLayout Containers: Creating a More Complex UI������������������������������������������������������������������������� 190 Interfacing with UI Elements: The ID Parameter������������������������������������������������������������������������������������������������ 196 Creating Modular Code: createDefaultGalaxy( )������������������������������������������������������������������������������������������������� 197 Updating the UI in Java: Using UI Objects���������������������������������������������������������������������������������198 A UI Instantiation Method: createUiTextViews( )������������������������������������������������������������������������200 Creating the transferDataValues( ) Method�������������������������������������������������������������������������������������������������������� 202 Testing and Debugging your Application����������������������������������������������������������������������������������������������������������� 206 Using the LogCat����������������������������������������������������������������������������������������������������������������������������������������������� 207 Summary�����������������������������������������������������������������������������������������������������������������������������������211 ■■Chapter 7: Making Apps Interactive: Intents, Event Handling, and Menus��������������������213 The Menu Class and Interface: Android Menus�������������������������������������������������������������������������214 Designing Menus in XML Using and �������������������������������������������������������������������������������������� 215 AVD Is Not Starting App: Using the Eclipse AVD Manager���������������������������������������������������������������������������������� 217 Inflating the Menu: onCreateOptionsMenu( )�����������������������������������������������������������������������������219 The MenuItem Class: onOptionsItemSelected( )������������������������������������������������������������������������������������������������ 220 The Java Switch Statement: Choosing a MenuItem������������������������������������������������������������������������������������������ 222 Using Intent Objects: The Android Intent Class�������������������������������������������������������������������������������������������������� 224 www.it-ebooks.info xii Contents Instantiate an Intent Object: An App’s Context��������������������������������������������������������������������������������������������������� 226 Explaining Context: The Android Context Class�������������������������������������������������������������������������������������������������� 227 Creating Your Second Activity: The EditGalaxy Class����������������������������������������������������������������������������������������� 228 Starting an Activity: Using the startActivity( ) Method��������������������������������������������������������������������������������������� 231 Coding the onCreate( ) Method: Using setContentView( )����������������������������������������������������������������������������������� 232 Creating an EditGalaxy UI: Using a RelativeLayout��������������������������������������������������������������������233 Using Editable Text Fields: The EditText Widget������������������������������������������������������������������������������������������������� 234 Using Buttons in UI Designs: The Button Widget����������������������������������������������������������������������������������������������� 235 Aligning Widgets Using RelativeLayout Parameters������������������������������������������������������������������������������������������ 235 Using the Eclipse Graphical Layout Editor (GLE)������������������������������������������������������������������������������������������������ 237 Giving an EditText Field a Hint for Your Users���������������������������������������������������������������������������������������������������� 238 Aligning Several UI Elements Using RelativeLayout Parameters����������������������������������������������������������������������� 240 Adding EditGalaxy to Your App: Editing Your AndroidManifest��������������������������������������������������������������������������� 243 Finishing Up the RelativeLayout UI Design��������������������������������������������������������������������������������244 Using Baseline Alignment: The layout_alignBaseline Parameter���������������������������������������������������������������������� 247 Adding a Graphics Asset to the RelativeLayout Container��������������������������������������������������������������������������������� 249 Event Handling: Using Event Listeners��������������������������������������������������������������������������������������251 Creating an Event Listener: onClickListener( )�������������������������������������������������������������������������������������������������� 251 Creating an Event Listener: onClickListener( )�������������������������������������������������������������������������������������������������� 252 Making the Galaxy Object Accessible: Using The static Keyword���������������������������������������������������������������������� 254 Transferring EditText Data to the Galaxy Object Using parse( ) Methods���������������������������������������������������������� 255 Summary�����������������������������������������������������������������������������������������������������������������������������������257 ■■Chapter 8: Android UI Design: Using Advanced ViewGroup Layout Containers�������������259 Using the Android GridLayout UI Container�������������������������������������������������������������������������������260 GridLayout Class: Grid-Based UI Layout Designs����������������������������������������������������������������������������������������������� 260 Using the rowSpec and columnSpec Parameters��������������������������������������������������������������������������������������������� 261 GridLayout Location, Flexibility, and Gravity������������������������������������������������������������������������������������������������������ 262 The GridLayout.LayoutParams Nested Class: Parameters��������������������������������������������������������������������������������� 263 The GridLayout.Alignment Nested Class: Alignment Constants������������������������������������������������������������������������� 265 Converting a RelativeLayout UI to a GridLayout������������������������������������������������������������������������268 Upgrading Your HelloUniverse App to Android 4.0��������������������������������������������������������������������������������������������� 269 GridLayout Parent Parameters: Let’s Experiment!��������������������������������������������������������������������������������������������� 272 www.it-ebooks.info Contents xiii GridLayout Parameters: Configuring Your Grid��������������������������������������������������������������������������272 GridLayout Alignment: The UseDefaultMargins Constant���������������������������������������������������������������������������������� 274 Changing the Widget Order Inside of the GridLayout����������������������������������������������������������������������������������������� 276 Combining GridLayout Cells: Using a Span�������������������������������������������������������������������������������282 Align GridLayout Cells: Using the layout_gravity Parameter����������������������������������������������������������������������������� 284 Using the Android SlidingPaneLayout Class������������������������������������������������������������������������������286 The Android SlidingPaneLayout: Class Specification����������������������������������������������������������������������������������������� 287 Using SlidingPaneLayout: Galaxy Selector��������������������������������������������������������������������������������291 Creating a SlidingPaneLayout: Revising the XML���������������������������������������������������������������������������������������������� 292 Set Pane Size: layout_width and layout_weight����������������������������������������������������������������������������������������������� 298 Summary�����������������������������������������������������������������������������������������������������������������������������������299 ■■Chapter 9: Android Graphic Design: Making Your UI Designs Visual�����������������������������301 Imaging Concepts, Formats, and Techniques����������������������������������������������������������������������������302 The Foundation of Digital Images: The “Pixel”�������������������������������������������������������������������������������������������������� 302 The Shape of a Digital Image: The Aspect Ratio������������������������������������������������������������������������������������������������ 303 Coloring Your Digital Images: RGB Color Theory������������������������������������������������������������������������������������������������ 304 Image Compositing Transparency: Alpha Channels������������������������������������������������������������������������������������������� 306 Algorithmic Image Compositing: Blending Modes��������������������������������������������������������������������������������������������� 307 Masking Digital Imagery: Using Alpha Channels����������������������������������������������������������������������������������������������� 308 Smoothing Edges: The Concept of Anti-Aliasing������������������������������������������������������������������������������������������������ 309 Optimizing Digital Images: Compress and Dither���������������������������������������������������������������������������������������������� 310 Using Indexed Color Imagery: Dithering Pixels�������������������������������������������������������������������������������������������������� 311 Android Image Formats: Lossless Versus Lossy������������������������������������������������������������������������������������������������ 313 Creating Android NinePatchDrawable Assets����������������������������������������������������������������������������314 Installing Your Android Draw 9-patch Software������������������������������������������������������������������������������������������������� 314 Opening the Source Digital Image in Draw 9-patch������������������������������������������������������������������������������������������ 316 Exploring Your New Draw 9-patch Editing Software����������������������������������������������������������������������������������������� 317 Defining Your NinePatchDrawable Scalable Areas�������������������������������������������������������������������������������������������� 318 Defining Your NinePatchDrawable Padding Areas��������������������������������������������������������������������������������������������� 321 Saving Your NinePatchDrawable Asset in Android��������������������������������������������������������������������������������������������� 325 The ImageButton Class: Multi-state Buttons�����������������������������������������������������������������������������326 The States: Normal, Pressed, Focused, Hovered����������������������������������������������������������������������������������������������� 327 www.it-ebooks.info xiv Contents Creating Multi-State Imagery: Using GIMP��������������������������������������������������������������������������������328 Using GIMP for Compositing: Importing a Layer������������������������������������������������������������������������������������������������ 330 Creating an Alpha Channel: Fuzzy Select Tool��������������������������������������������������������������������������������������������������� 332 Creating a Composite Layer Using the Clipboard���������������������������������������������������������������������������������������������� 335 Creating Five Resolution Density Button Versions��������������������������������������������������������������������������������������������� 338 Creating Your Other Three ImageButton States������������������������������������������������������������������������������������������������� 340 Creating Your ImageButton’s XML Structure�����������������������������������������������������������������������������345 Referencing Multi-State XML via activity_main������������������������������������������������������������������������������������������������ 347 Adding a NinePatch to a SlidingPaneLayout�����������������������������������������������������������������������������348 Summary�����������������������������������������������������������������������������������������������������������������������������������350 ■■Chapter 10: Android Animation: Making Your UI Designs Move������������������������������������353 Frame Animation Concepts and Techniques�����������������������������������������������������������������������������354 Frame Animation: Cels, Frames, and Terminology��������������������������������������������������������������������������������������������� 354 Frame Animation Formats: PNG, GIF, JPEG & WebP������������������������������������������������������������������������������������������� 354 Optimizing Frames: Color Depth and Frame Count�������������������������������������������������������������������������������������������� 355 Animation Resolution: Pixels Add to File Size!��������������������������������������������������������������������������������������������������� 356 The Android AnimationDrawable Class�������������������������������������������������������������������������������������357 Creating Frame Animation Using XML Markup��������������������������������������������������������������������������358 The Tag: Your Frame Container���������������������������������������������������������������������������������������������� 359 The Tag: How to Add in Animation Frames������������������������������������������������������������������������������������������� 359 Creating Frame Animation in MainActivity��������������������������������������������������������������������������������360 Creating an anim_milkyway.xml File and Markup��������������������������������������������������������������������������������������������� 360 Wiring-Up Your Animation: Referencing Your XML��������������������������������������������������������������������������������������������� 362 Resizing Source Imagery: Using Padding Values����������������������������������������������������������������������������������������������� 364 Testing Your SlidingPane in a Galaxy Nexus AVD����������������������������������������������������������������������������������������������� 365 Tween Animation Concepts and Techniques�����������������������������������������������������������������������������367 Procedural Concepts: Rotate, Scale, Translate��������������������������������������������������������������������������������������������������� 367 Procedural Data Values: Ranges and Pivot Point����������������������������������������������������������������������������������������������� 368 Procedural Compositing: Alpha Blending����������������������������������������������������������������������������������������������������������� 369 Procedural Timing: Using Duration and Offsets������������������������������������������������������������������������������������������������� 370 www.it-ebooks.info Contents xv Procedural Loops: RepeatCount and RepeatMode�������������������������������������������������������������������������������������������� 371 The Animation Class: Android Tween Animation������������������������������������������������������������������������������������������������ 371 Creating Tween Animation Using XML Markup��������������������������������������������������������������������������372 Create an /anim Folder: Tween Animation Assets���������������������������������������������������������������������������������������������� 372 Rotate Transform: The Configuration Parameters���������������������������������������������������������������������������������������������� 374 SetUp an ImageView: Assigning an ID Parameter��������������������������������������������������������������������������������������������� 376 Java Coding: Tying Your UI Together Using Java������������������������������������������������������������������������������������������������ 376 Making Your UI Interactive: Add Event Handling������������������������������������������������������������������������������������������������ 380 Using setBackground( ): Upgrade App to SDK V16�������������������������������������������������������������������������������������������� 385 Hybrid Animation: Using Frames with Tween����������������������������������������������������������������������������387 Setting up Your Hybrid Animation via Java Code����������������������������������������������������������������������������������������������� 392 Completing the Galaxy UI Design: Using setText()�������������������������������������������������������������������������������������������� 394 Procedural Animation or Frame Animation?������������������������������������������������������������������������������395 The Animator Class: Parameter Animation��������������������������������������������������������������������������������396 Summary�����������������������������������������������������������������������������������������������������������������������������������397 ■■Chapter 11: Digital Video: Streaming Video, MediaPlayer, and MediaController classes������������������������������������������������������������������������������������������������399 The FrameLayout Class: Framing DV Content���������������������������������������������������������������������������400 FrameLayout.LayoutParams Nested Class: Gravity������������������������������������������������������������������������������������������� 401 Creating a Frame Layout Using XML Mark-Up��������������������������������������������������������������������������������������������������� 403 Create a PlayVideo.java Activity Subclass���������������������������������������������������������������������������������404 Creating Your activity_play XML UI Design��������������������������������������������������������������������������������407 The VideoView Class: A VideoPlayer Widget������������������������������������������������������������������������������408 A VideoView Lifecycle: Eight Video Playback Stages����������������������������������������������������������������������������������������� 409 Creating a VideoView Widget in the FrameLayout��������������������������������������������������������������������������������������������� 412 The Uri Class: Referencing the Video Data��������������������������������������������������������������������������������414 The Uri.parse( ) Method: Loading Your VideoView���������������������������������������������������������������������������������������������� 415 Digital Video Concepts: Bitrates & Codecs��������������������������������������������������������������������������������418 Digital Video in Android: MPEG4 H.264 and WebM�������������������������������������������������������������������������������������������� 418 Digital Video Compression: Bitrate and Streams����������������������������������������������������������������������������������������������� 419 Digital Video Optimization: Codec and Settings������������������������������������������������������������������������������������������������� 421 www.it-ebooks.info xvi Contents Creating Digital Video Content: Terragen3���������������������������������������������������������������������������������423 Creating an Uncompressed AVI File: VirtualDub������������������������������������������������������������������������������������������������� 425 Applying Video Compression: Sorenson Squeeze 9������������������������������������������������������������������������������������������� 428 Starting A Video Playback: Using start( )�����������������������������������������������������������������������������������434 Positioning a Video Asset Using layout_gravity������������������������������������������������������������������������������������������������� 436 Scaling Video Non-Uniformly to Fit the Screen�������������������������������������������������������������������������������������������������� 437 Android MediaPlayer: VideoPlayback Engine����������������������������������������������������������������������������438 Loop Digital Video: Using OnPrepareListener( )������������������������������������������������������������������������������������������������� 439 Streaming Digital Video: Using HTTP URL in URI����������������������������������������������������������������������������������������������� 442 Add a Video Transport UI Using MediaController����������������������������������������������������������������������������������������������� 443 Summary�����������������������������������������������������������������������������������������������������������������������������������445 ■■Chapter 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool ���������������������������������������������������������������������������������������������������������������������447 Audacity 2: Creating Digital Audio Assets����������������������������������������������������������������������������������448 Audacity Plug-Ins: Adding Codecs and Features����������������������������������������������������������������������������������������������� 448 Free Digital Audio: Locate HelloUniverse Audio������������������������������������������������������������������������������������������������� 450 Digital Audio Optimization: Concepts & Formats����������������������������������������������������������������������������������������������� 451 Setting Sample Rate and Resolution in Audacity����������������������������������������������������������������������������������������������� 453 Exporting Uncompressed PCM Baseline WAV Format��������������������������������������������������������������������������������������� 454 Exporting via Lossless FLAC: FLAC audio files�������������������������������������������������������������������������������������������������� 455 Exporting Lossy Ogg Vorbis: OGG audio files����������������������������������������������������������������������������������������������������� 456 Exporting Lossy MPEG3 Format: MP3 audio files���������������������������������������������������������������������������������������������� 456 Exporting Lossy MPEG4 Format: M4A audio files���������������������������������������������������������������������������������������������� 457 Exporting Narrow Band Format: AMR audio files����������������������������������������������������������������������������������������������� 458 Android SoundPool: Audio Engine & Methods���������������������������������������������������������������������������460 Adding a SoundPool Engine to the HelloUniverse���������������������������������������������������������������������������������������������� 462 Creating a triggerSample() Method: SoundPool play()������������������������������������������������������������������������������������� 466 Adding SoundPool to Your UI: Calling triggerSample()�������������������������������������������������������������������������������������� 471 Summary�����������������������������������������������������������������������������������������������������������������������������������472 www.it-ebooks.info Contents xvii ■■Chapter 13: Android Service Class and Threads: Background Processing�������������������475 Android Service Classes: Characteristics����������������������������������������������������������������������������������476 Controlling Your Service: Privacy and Priority���������������������������������������������������������������������������������������������������� 477 Processes and Thread: Foundational Information��������������������������������������������������������������������������������������������� 478 Spawning a Process: The android:process XML Parameter������������������������������������������������������������������������������ 479 The Process Lifecycle: Keeping a Process Alive������������������������������������������������������������������������������������������������ 480 Thread Caveats: Don’t Interfere with UI Thread������������������������������������������������������������������������������������������������� 483 Should Your Android App Use Services or Threads?������������������������������������������������������������������������������������������ 484 Creating a Service Subclass: AmbientService���������������������������������������������������������������������������485 Using a Service to Carry Out a Task������������������������������������������������������������������������������������������������������������������� 487 Configuring AndroidManifest to Add a ��������������������������������������������������������������������������������������������� 490 Starting a Service: Using startService( )�����������������������������������������������������������������������������������491 Setting Up Your UI Design Using XML and Java������������������������������������������������������������������������������������������������� 492 Testing the PlayVideo Class with the Nexus One����������������������������������������������������������������������������������������������� 500 Summary�����������������������������������������������������������������������������������������������������������������������������������503 ■■Chapter 14: Android Content Providers: Providing Data to Applications ���������������������505 An Overview of Android Content Providers�������������������������������������������������������������������������������506 Database Fundamentals: Concepts and Terms�������������������������������������������������������������������������507 SQLite: The Open Source Database Engine�������������������������������������������������������������������������������508 Android Built-in Content Providers��������������������������������������������������������������������������������������������510 Android 1.5 Contacts Database Contact Provider���������������������������������������������������������������������������������������������� 510 Deprecated Database Structures: Software Upgrades�������������������������������������������������������������������������������������� 511 The Android MediaStore Content Providers������������������������������������������������������������������������������������������������������� 514 The Android CalendarContract Content Providers��������������������������������������������������������������������������������������������� 514 Referencing a Content Provider: Content URI����������������������������������������������������������������������������515 Creating the Activity: ContactGalaxy.java����������������������������������������������������������������������������������517 Adding the ContactGalaxy Class to the Manifest����������������������������������������������������������������������������������������������� 519 Adding a Contact Galaxy Ruler Item to the Menu���������������������������������������������������������������������������������������������� 520 Adding a Menu Intent in the MainActivity Class������������������������������������������������������������������������������������������������ 521 Creating Your Galaxy Emperor Contact Database���������������������������������������������������������������������������������������������� 523 www.it-ebooks.info xviii Contents Adding Permissions in the AndroidManifest�����������������������������������������������������������������������������527 TableLayout: Creating Tabular UI Designs���������������������������������������������������������������������������������529 Creating Your TableLayout UI for ContactGalaxy������������������������������������������������������������������������������������������������ 530 ContactGalaxy Class: Accessing Your Database������������������������������������������������������������������������532 Using the Android ContentResolver Class���������������������������������������������������������������������������������������������������������� 535 Writing to a Database: addGalaxyViceroy( )�������������������������������������������������������������������������������541 Summary�����������������������������������������������������������������������������������������������������������������������������������550 ■■Chapter 15: Developing for Android Wearable Devices ������������������������������������������������551 True Wearables versus Android Peripherals������������������������������������������������������������������������������552 Development Strategy: Android, Wear SDK, or Plug-In��������������������������������������������������������������553 Smartwatch Optimization Fundamentals: Display and CPU������������������������������������������������������555 Creating Your EarthTime.APK Android App��������������������������������������������������������������������������������556 EarthTime UI Design: Styling an AnalogClock����������������������������������������������������������������������������559 Adding the Background Image of Planet Earth�������������������������������������������������������������������������������������������������� 560 EarthTime Code: MainActivity.java Class����������������������������������������������������������������������������������������������������������� 563 Attaching the Pine to the Workstation USB Port������������������������������������������������������������������������������������������������ 566 Creating Your EarthTime Application Icons�������������������������������������������������������������������������������������������������������� 570 Adding Interactivity to the EarthTime App���������������������������������������������������������������������������������573 Adding Four ImageView UI Icons to a UI Design������������������������������������������������������������������������������������������������ 574 Enhancing the App: Adding Background Images����������������������������������������������������������������������������������������������� 582 EarthTime Interactive: Adding Event Handling��������������������������������������������������������������������������������������������������� 584 Summary�����������������������������������������������������������������������������������������������������������������������������������590 ■■Chapter 16: The Future of Android: The 64-Bit Android 5.0 OS�������������������������������������591 What’s New in Android 5: New OS Features������������������������������������������������������������������������������592 Android 5.0 Platform: 64-Bit Linux and Java 7�������������������������������������������������������������������������������������������������� 592 Android Runtime: ART Will Become the Default���������������������������������������������������������������������������������������������� 593 Enhanced 3D Support: OpenGL, Z-Layers, and Shadows���������������������������������������������������������������������������������� 593 The Camera API: UHD with High Dynamic Range������������������������������������������������������������������������������������������� 596 Project Volta: Control Power Use Optimization�������������������������������������������������������������������������������������������������� 597 Android Peripheral: Bluetooth Low Energy (BLE)����������������������������������������������������������������������������������������������� 597 www.it-ebooks.info Contents xix Enhanced Notifications: Notify via Lockscreen�������������������������������������������������������������������������������������������������� 598 USB Audio Port: Connect Audiophile Equipment������������������������������������������������������������������������������������������������ 598 Android Support: New CPU Hardware and Search������������������������������������������������������������������������������������������ 599 Google Play 5.0: New Server-Side 5.0 Services������������������������������������������������������������������������������������������������ 599 Material Design: Multi-Platform UI Design��������������������������������������������������������������������������������600 Developing 64-Bit Android: The Android IDE��������������������������������������������������������������������������601 Removing Java 6: Prepare a System for Android 5�������������������������������������������������������������������602 Java SE: The Foundation for Android Studio 5�����������������������������������������������������������������������602 Android Studio 5: IntelliJ Android SDK Bundle��������������������������������������������������������������������������604 Downloading and Installing Android Studio�������������������������������������������������������������������������������607 Exploring Android Studio 5: Configuring an IDE������������������������������������������������������������������������������������������������� 610 Creating Your First Android Project����������������������������������������������������������������������������������������615 Exploring Your Android 5.0 App in IntelliJ���������������������������������������������������������������������������������������������������������� 620 Updating the Android Studio IntelliJ IDEA���������������������������������������������������������������������������������622 Android TV: Setting Up Android Apps for iTV��������������������������������������������������������������������������636 Porting the EarthTime App to Android TV����������������������������������������������������������������������������������641 Summary�����������������������������������������������������������������������������������������������������������������������������������650 ■■Appendix A: Audio Concepts, Terminology, and Codecs �����������������������������������������������651 Analog Audio and Digital Audio: History, Concepts, and Theory������������������������������������������������651 Foundation of Analog Audio: Sound Waves of Air ��������������������������������������������������������������������������������������������� 651 Digital Audio: Samples, Resolution, and Frequency������������������������������������������������������������������������������������������� 652 Digital Audio Attributes: HD, Stream, and Bit Rate��������������������������������������������������������������������������������������������� 654 Android Digital Audio: Digital Audio Formats����������������������������������������������������������������������������������������������������� 655 Digital Audio Optimization: Device Compatible�������������������������������������������������������������������������������������������������� 657 Audio Sequencing: Concepts and Principles�����������������������������������������������������������������������������658 Digital Audio Synthesis: Concepts and Principles���������������������������������������������������������������������������������������������� 658 Raw Audio Data Optimization: Memory Footprint���������������������������������������������������������������������������������������������� 660 Digital Audio Synthesis and Sequencing Caveats���������������������������������������������������������������������������������������������� 662 Index���������������������������������������������������������������������������������������������������������������������������������665 www.it-ebooks.info About the Author Wallace Jackson has been writing for leading multimedia publications about his work in new media content development since the advent of Multimedia Producer Magazine nearly two decades ago, when he wrote about advanced computer processor architecture for an issue centerfold (removable “mini-issue” insert) distributed at the SIGGRAPH trade show Since then, Wallace has written for a number of other popular publications about his work in interactive 3D and new media advertising campaign design, including 3D Artist Magazine, Desktop Publishers Journal, CrossMedia Magazine, AVvideo/Multimedia Producer Magazine, Digital Signage Magazine, and Kiosk Magazine Wallace Jackson has authored half a dozen Android book titles for Apress, including four titles in the popular Pro Android series This particular Android Apps for Absolute Beginners title has been rewritten entirely from scratch three times, and this third edition is one of the most thorough and comprehensive Android titles found on the market Wallace Jackson is currently the CEO of Mind Taffy Design, a new media content production and digital campaign design and development agency located in North Santa Barbara County, halfway between their clientele in Silicon Valley to the north and in Hollywood, “The OC,” and San Diego to the south Mind Taffy also produces interactive 3D content for major brands around the world from their content production studio on Point Conception Peninsula in the California Central Coast area Mind Taffy Design has created open source technology (HTML5, Java, and Android) and digital new media content deliverables for more than two decades (since 1991) for a large number of the top branded manufacturers in the world, including Sony, Samsung, IBM, Epson, Nokia, TEAC, Sun, SGI, Dell, Compaq, ViewSonic, Western Digital, CTX International, KDS USA, KFC, ADI and Mitsubishi Wallace Jackson received his undergraduate degree in Business Economics from the University of California at Los Angeles (UCLA) and his graduate degree in MIS Design and Implementation from the University of Southern California (USC) His post-graduate degree, also from USC, is in Marketing Strategy He subsequently completed the USC Graduate Entrepreneurship Program in USC’s popular night-time Marshall School of Business MBA programs The night-time USC MBA program allowed Mr Jackson to work full-time while he completed his graduate and post-graduate business degrees xxi www.it-ebooks.info About the Technical Reviewer Chád Darby is an author, instructor, and speaker in the Java development world As a recognized authority on Java applications and architectures, he has presented technical sessions at software development conferences worldwide (U.S., U.K., India, Russia, and Australia) In his 15 years as a professional software architect, he’s had the opportunity to work for Blue Cross/Blue Shield, Merck, Boeing, Red Hat, and a handful of startup companies Chád is a contributing author to several Java books, including Professional Java E-Commerce (Wrox Press), Beginning Java Networking (Wrox Press), and XML and Web Services Unleashed (Sams Publishing) Chád has Java certifications from Sun Microsystems and IBM He holds a B.S in Computer Science from Carnegie Mellon University xxiii www.it-ebooks.info Acknowledgments I would like to acknowledge all my fantastic editors and the support staff at Apress who worked long hours and toiled so very hard on this book to make it the ultimate Absolute Beginner Android title Matthew Moodie, for his work as the Lead Editor on the book, and for his experience and guidance during the process of making this book one of the great Android beginner titles Mark Powers, for his work as the Coordinating Editor on the book, and for his constant diligence in making sure I hit or surpassed my deadlines Ralph Moore and Kezia Endsley, for their work as the Copy Editors on this book, and for their close attention to detail, and for conforming the text to the current Apress book writing standards Chad Darby, for his work as the Technical Reviewer on the book, and for making sure I didn’t make any programming mistakes Java code with mistakes does not run properly, if at all, unless they are very lucky mistakes, which is quite rare in computer programming these days Frank Serafine, my close friend, the world’s finest and most respected sound designer, and a popular rock musician, for contributing the audio samples used in this book These audio samples are from his stellar (no pun intended) work on some of the world’s most popular science fiction and action adventure movies and television shows, including but not limited to Star Trek and Hunt for Red October Finally, I’d like to acknowledge Oracle for acquiring Sun Microsystems and for continuing to enhance Java so that it remains the premiere open source programming language, and Google, for making Android the premiere open source operating system and for acquiring ON2’s VP8 video codec and making it available to multimedia producers on the Android and HTML5 platforms xxv www.it-ebooks.info ... 32-bit Android is currently using Version 4.4.4, this book will be more advanced than Android Apps for Absolute Beginners, First Edition, when Android OS Version 1.5 was released by Google for smartphones,... Google for smartphones, or Android Apps for Absolute Beginners, Second Edition, when Android OS Version 3.0 was released for tablets Since then, five revisions of the 32-bit Android OS Version 4.x... process, which I cover in this book I wrote Android Apps for Absolute Beginners, Third Edition from scratch, targeting those readers who are absolute beginners to Android yet are technically savvy, but

Ngày đăng: 28/03/2019, 13:26

Từ khóa liên quan

Mục lục

  • Contents at a Glance

  • Contents

  • About the Author

  • About the Technical Reviewer

  • Acknowledgments

  • Introduction

  • Chapter 1: Setting Up Your Android App Development System

    • The History of the Android OS: Impressive Growth

    • Advantage Android: How Can Android Benefit Me?

    • The Scope of This Book

      • What is Covered in This Book

      • What is Not Covered in This Book

      • Assembling Your Android Development Workstation

        • Android Development Workstation: Hardware Foundation

        • Android Development Workstation: Software Foundation

        • Java SE 6: Download and Install a Foundation for Android

        • Android ADT Bundle: Find and Download Android’s IDE

        • Install the Android ADT Bundle: Extract Android ADT IDE

        • Digital Image Compositing Software: the GIMP

        • 3D Modeling, Rendering, and Animation: Blender 3D

        • UI Design and Wireframing Software: Pencil Project

        • Digital Audio Editing and Engineering: Audacity

        • Professional Digital Video Editing: EditShare Lightworks

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan