Learn Java for Android Development: Edition 2

Apress
170
Free sample

Android development is hot, and many programmers are interested in joining the fun. However, because this technology is based on Java, you should first obtain a solid grasp of the Java language and its foundational APIs to improve your chances of succeeding as an Android app developer. After all, you will be busy learning the architecture of an Android app, the various Android-specific APIs, and Android-specific tools. If you do not already know Java fundamentals, you will probably end up with a massive headache from also having to quickly cram those fundamentals into your knowledge base.

Learn Java for Android Development, Second Edition teaches programmers of any skill level the essential Java language and foundational Java API skills that must be learned to improve the programmer’s chances of succeeding as an Android app developer. Each of the book’s 14 chapters provides an exercise section that gives you the opportunity to reinforce your understanding of the chapter’s material. Answers to the book’s more than 500 exercises are provided in an appendix. A second appendix provides a significant game-oriented Java application, which you can convert into an Android app.

Once you complete this book, you should be ready to dive into beginning Android app development. Maybe, start that journey with Apress' Beginning Android.

Read more

About the author

Jeff Friesen is a freelance tutor and software developer with an emphasis on Java (and now Android). In addition to authoring Learn Java for Android Development and co-authoring Android Recipes -- Jeff has written numerous articles on Java and other technologies for JavaWorld (a href="http://www.JavaWorld.com"JavaWorld.com/a), informIT (a href="http://www.InformIT.com"InformIT.com/a), a href="http://www.java.net"Java.net/a, and DevSource (a href="http://www.DevSource.com"DevSource.com/a). Jeff can be contacted via his website at a href="http://www.tutortutor.ca"TutorTutor.ca/a.
Read more
3.5
170 total
Loading...

Additional Information

Publisher
Apress
Read more
Published on
Mar 21, 2013
Read more
Pages
780
Read more
ISBN
9781430257233
Read more
Language
English
Read more
Genres
Computers / Networking / General
Computers / Programming / Mobile Devices
Computers / Programming Languages / General
Read more
Content Protection
This content is DRM protected.
Read more
Read Aloud
Available on Android devices
Read more

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
Beginning Java 7 guides you through version 7 of the Java language and a wide assortment of platform APIs. New Java 7 language features that are discussed include switch-on-string and try-with-resources. APIs that are discussed include Threading, the Collections Framework, the Concurrency Utilities, Swing, Java 2D, networking, JDBC, SAX, DOM, StAX, XPath, JAX-WS, and SAAJ. This book also presents an introduction to Android app development so that you can apply some of its knowledge to the exciting world of Android app development.

This book presents the following table of contents:

Chapter 1 introduces you to Java and begins to cover the Java language by focusing on fundamental concepts such as comments, identifiers, variables, expressions, and statements.

Chapter 2 continues to explore this language by presenting all of its features for working with classes and objects. You learn about features related to class declaration and object creation, encapsulation, information hiding, inheritance, polymorphism, interfaces, and garbage collection.

Chapter 3 focuses on the more advanced language features related to nested classes, packages, static imports, exceptions, assertions, annotations, generics, and enums. Additional chapters introduce you to the few features not covered in Chapters 1

through 3.

Chapter 4 largely moves away from covering language features (although it does introduce class literals and strictfp) while focusing on language-oriented APIs. You learn about Math, StrictMath, Package, Primitive Type Wrapper Classes, Reference, Reflection, String, StringBuffer and StringBuilder, Threading, BigDecimal, and BigInteger in this chapter.

Chapter 5 begins to explore Java's utility APIs by focusing largely on the Collections Framework. However, it also discusses legacy collection-oriented APIs and how to create your own collections.

Chapter 6 continues to focus on utility APIs by presenting the concurrency utilities along with the Objects and Random classes.

Chapter 7 moves you away from the command-line user interfaces that appear in previous chapters and toward graphical user interfaces. You first learn about the Abstract Window Toolkit foundation, and then explore the Java Foundation Classes in

terms of Swing and Java 2D. Appendix C explores Accessibility and Drag and Drop.

Chapter 8 explores filesystem-oriented I/O in terms of the File, RandomAccessFile, stream, and writer/reader classes.

Chapter 9 introduces you to Java's network APIs (e.g., sockets). It also introduces you to the JDBC API for interacting with databases along with the Java DB database product.

Chapter 10 dives into Java's XML support by first presenting an introduction to XML (including DTDs and schemas). It next explores the SAX, DOM, StAX, XPath, and XSLT APIs. It even briefly touches on the Validation API. While exploring XPath, you encounter namespace contexts, extension functions and function resolvers, and variables and variable resolvers.

Chapter 11 introduces you to Java's support for SOAP-based and RESTful web services. As well as providing you with the basics of these web service categories, Chapter 11 presents some advanced topics, such as working with the SAAJ API to communicate

with a SOAP-based web service without having to rely on JAX-WS. You will appreciate having learned about XML in Chapter 10 before diving into this chapter.

Chapter 12 helps you put to use some of the knowledge you've gathered in previous chapters by showing you how to use Java to write an Android app's source code. This chapter introduces you to Android, discusses its architecture, shows you how to

install necessary tools, and develops a simple app.

Appendix A presents the solutions to the programming exercises that appear near the end of Chapters 1 through 12.

Appendix B introduces you to Java's Scripting API along with Java 7's support for dynamically typed languages.

Appendix C introduces you to additional APIs and architecture topics. Examples include Accessibility, classloaders, Console, Drag and Drop, Java Native Interface, and System Tray.

Appendix D presents a gallery of significant applications that demonstrate various aspects of Java.

Unfortunately, there are limits to how much knowledge can be crammed into a print book. For this reason, Appendixes A, B, C, and D are not included in this book's pages. Instead, these appendixes are freely distributed as PDF files. Appendixes A and B are bundled with the book's associated code file at the Apress website (http://www.apress.com/9781430239093). Appendixes C and D are bundled with their respective code files at my TutorTutor.ca website

(http://tutortutor.ca/cgi-bin/makepage.cgi?/books/bj7).

Learn all the Java and Android skills you need to start making powerful mobile applicationsAbout This BookKick-start your Android programming career, or just have fun publishing apps to the Google Play marketplaceA first-principles introduction to Java, via Android, which means you'll be able to start building your own applications from scratchLearn by example and build three real-world apps and over 40 mini apps throughout the bookWho This Book Is For

Are you trying to start a career in programming, but haven't found the right way in? Do you have a great idea for an app, but don't know how to make it a reality? Or maybe you're just frustrated that “to learn Android, you must know java.” If so, Android Programming for Beginners is for you. You don't need any programming experience to follow along with this book, just a computer and a sense of adventure.

What You Will LearnMaster the fundamentals of coding Java for AndroidInstall and set up your Android development environmentBuild functional user interfaces with the Android Studio visual designerAdd user interaction, data captures, sound, and animation to your appsManage your apps' data using the built-in Android SQLite databaseFind out about the design patterns used by professionals to make top-grade applicationsBuild, deploy, and publish real Android applications to the Google Play marketplaceIn Detail

Android is the most popular OS in the world. There are millions of devices accessing tens of thousands of applications. It is many people's entry point into the world of technology; it is an operating system for everyone. Despite this, the entry-fee to actually make Android applications is usually a computer science degree, or five years' worth of Java experience.

Android Programming for Beginners will be your companion to create Android applications from scratch—whether you're looking to start your programming career, make an application for work, be reintroduced to mobile development, or are just looking to program for fun. We will introduce you to all the fundamental concepts of programming in an Android context, from the Java basics to working with the Android API. All examples are created from within Android Studio, the official Android development environment that helps supercharge your application development process.

After this crash-course, we'll dive deeper into Android programming and you'll learn how to create applications with a professional-standard UI through fragments, make location-aware apps with Google Maps integration, and store your user's data with SQLite. In addition, you'll see how to make your apps multilingual, capture images from a device's camera, and work with graphics, sound, and animations too.

By the end of this book, you'll be ready to start building your own custom applications in Android and Java.

Style and approach

With more than 40 mini apps to code and run, Android Programming for Beginners is a hands-on guide to learning Android and Java. Each example application demonstrates a different aspect of Android programming. Alongside these mini apps, we push your abilities by building three larger applications to demonstrate Android application development in context.

Beginning Java™ SE 6 Platform: From Novice to Professional steers you through the maze of Java Standard Edition (SE) 6 features. The first chapter sets the stage by introducing Java SE 6 in terms of its name change, themes, an overview, and a sampling of new features. It also briefly discusses the first two Java SE 6 updates.

The remaining nine chapters organize features into the following categories: core libraries, GUI toolkits: AWT, GUI toolkits: Swing, internationalization, Java Database Connectivity, monitoring and management, networking, scripting, and security and web services. While exploring these chapters, you will encounter a variety of useful and interesting topics: introducing a new locale with its own currency, creating a new JConsole plug–in, creating a scripted JEditorPane component, invoking and communicating with JavaFX Script and JRuby scripts from a Java application that interacts with the Scripting API, signing an arbitrary XML document and validating a signed document’s XML signature, and accessing an existing web service are examples.

With a few exceptions, each of chapters 2 through 10 alphabetically organizes its topics for convenient access. Furthermore, all 10 chapters end with a “Test Your Understanding” section that provides questions and exercises to help you reinforce your understanding of what you have read.

Additional features are covered in the first three appendices. The first appendix introduces you to annotation types for annotation processors, Common Annotations 1.0, and several tables that conveniently organize additional annotation types that are new to Java SE 6. The second appendix explores changes made to various Java tools. For example, the Java compiler tool now supports annotation processing—you'll learn how to take advantage of this capability by writing your own annotation processor. Another example: you'll learn how to interact with the command–line script shell. The third appendix looks at a variety of performance enhancements, ranging from a fix for the gray–rect problem to single–threaded rendering.

The second-to-last appendix provides answers and code to all of the questions and exercises in the various “Test Your Understanding” sections. The final appendix anticipates Java SE 7 by looking at features most likely to make the cut, including closures, the Java Module System, and the Swing Application Framework.

By the time you finish this book, you will have mastered most of what’s new and improved in Java SE 6. Although a few features, such as multiple gradient paints and an in–depth look at StAX are not covered, you will find a growing list of articles devoted to these additional topics on the author’s website (JavaJeff.mb.ca). Follow the links at the bottom of the website’s Articles page.

Beginning Java™ SE 6 Platform: From Novice to Professional steers you through the maze of Java Standard Edition (SE) 6 features. The first chapter sets the stage by introducing Java SE 6 in terms of its name change, themes, an overview, and a sampling of new features. It also briefly discusses the first two Java SE 6 updates.

The remaining nine chapters organize features into the following categories: core libraries, GUI toolkits: AWT, GUI toolkits: Swing, internationalization, Java Database Connectivity, monitoring and management, networking, scripting, and security and web services. While exploring these chapters, you will encounter a variety of useful and interesting topics: introducing a new locale with its own currency, creating a new JConsole plug–in, creating a scripted JEditorPane component, invoking and communicating with JavaFX Script and JRuby scripts from a Java application that interacts with the Scripting API, signing an arbitrary XML document and validating a signed document’s XML signature, and accessing an existing web service are examples.

With a few exceptions, each of chapters 2 through 10 alphabetically organizes its topics for convenient access. Furthermore, all 10 chapters end with a “Test Your Understanding” section that provides questions and exercises to help you reinforce your understanding of what you have read.

Additional features are covered in the first three appendices. The first appendix introduces you to annotation types for annotation processors, Common Annotations 1.0, and several tables that conveniently organize additional annotation types that are new to Java SE 6. The second appendix explores changes made to various Java tools. For example, the Java compiler tool now supports annotation processing—you'll learn how to take advantage of this capability by writing your own annotation processor. Another example: you'll learn how to interact with the command–line script shell. The third appendix looks at a variety of performance enhancements, ranging from a fix for the gray–rect problem to single–threaded rendering.

The second-to-last appendix provides answers and code to all of the questions and exercises in the various “Test Your Understanding” sections. The final appendix anticipates Java SE 7 by looking at features most likely to make the cut, including closures, the Java Module System, and the Swing Application Framework.

By the time you finish this book, you will have mastered most of what’s new and improved in Java SE 6. Although a few features, such as multiple gradient paints and an in–depth look at StAX are not covered, you will find a growing list of articles devoted to these additional topics on the author’s website (JavaJeff.mb.ca). Follow the links at the bottom of the website’s Articles page.

©2018 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.