Android Programming for Beginners
eBook - ePub

Android Programming for Beginners

Build in-depth, full-featured Android apps starting from zero programming experience, 3rd Edition

John Horton

Buch teilen
  1. 742 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Android Programming for Beginners

Build in-depth, full-featured Android apps starting from zero programming experience, 3rd Edition

John Horton

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Learn the Java and Android skills you need to start developing powerful mobile applications with the help of actionable steps

Key Features

  • Kick-start your Android programming career or just have fun publishing apps to the Google Play marketplace
  • Get a first principles introduction to using Java and Android and prepare to start building your own apps from scratch
  • Learn by example by building four real-world apps and dozens of mini apps

Book Description

Do you want to make a career in programming but don't know where to start? Do you have a great idea for an app but don't know how to make it a reality? Or are you worried that you'll have to learn Java programming to become an Android developer? Look no further! This new and expanded third edition of Android Programming for Beginners will be your guide to creating Android applications from scratch.

The book starts by introducing you to all the fundamental concepts of programming in an Android context, from the basics of Java to working with the Android API. You'll learn with the help of examples that use up-to-date API classes and are created within Android Studio, the official Android development environment that helps supercharge your mobile application development process. After a crash course on the key programming concepts, you'll explore Android programming and get to grips with creating applications with a professional-standard UI using fragments and storing user data with SQLite. This Android Java book also shows you how you can make your apps multilingual, draw on the screen with a finger, and work with graphics, sound, and animations.

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

What you will learn

  • Understand the fundamentals of coding in Java for Android
  • Install and set up your Android development environment
  • Build functional user interfaces with the Android Studio visual designer
  • Add user interaction, data captures, sound, and animation to your apps
  • Manage your apps' data using the built-in Android SQLite database
  • Explore the design patterns used by professionals to build top-grade applications
  • Build real-world Android applications that you can deploy to the Google Play marketplace

Who this book is for

This Android book is for you if you are completely new to Java, Android, or programming and want to get started with Android app development. If you have experience of using Java on Android, this book will serve as a refresher to help you advance your knowledge and make progress through the early projects covered in the book.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Android Programming for Beginners als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Android Programming for Beginners von John Horton im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatica & Programmazione di dispositivi mobili. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Chapter 1: Beginning Android and Java

Welcome to Android Programming for Beginners Third Edition. In this first chapter, we won't waste any time getting started with developing Android apps. We will look at what is so great about Android, what exactly Android and Java are, how they work and complement each other, and what that means to us as future developers. Moving quickly on, we will set up the required software so we can build and deploy a simple first app.
Note
It is my aim to keep this book up to date. Please check the following web page for any discussion and tips on any changes to Android Studio since the book was first printed: http://gamecodeschool.com/books/android-programming-for-beginners-3rd-edition#android-studio-updates.
By the end of this chapter, we will have done the following:
  • Discovered what is new in this third edition
  • Learned how Java and Android work together
  • Set up our development environment – Android Studio – which takes care of all the components involved in building the Android apps that we will learn about next
  • Learned about the Java Development Kit (JDK) and the Android Application Programming Interface (API) and how we use them through Android Studio
  • Built our very first Android app
  • Deployed the app on an Android emulator
  • Run our app on an Android emulator and a real device
That's a lot to get through, so let's get started.

Technical requirements

The following are the official technical requirements for Android development with Android Studio and its related tools. However, these are the absolute bare minimum. Please see the Setting up Android Studio section for further details.
The requirements for Windows are as follows:
  • Microsoft® Windows® 7/8/10 (64-bit)
  • 4 GB RAM as a minimum; 8 GB RAM recommended
  • 2 GB of available disk space as a minimum; 4 GB recommended (500 MB for the Integrated Development Environment (IDE) + 1.5 GB for the Android Software Development Kit (SDK) and emulator system image)
  • 1,280 x 800 minimum screen resolution
The requirements for Mac are as follows:
  • Mac® OS X® 10.10 (Yosemite) or higher, up to 10.14 (macOS Mojave)
  • 4 GB RAM as a minimum; 8 GB RAM recommended
  • 2 GB of available disk space as a minimum; 4 GB recommended (500 MB for the IDE + 1.5 GB for the Android SDK and emulator system image)
  • 1,280 x 800 minimum screen resolution
The requirements for Linux are as follows:
  • GNOME or KDE desktop
  • Tested on gLinux based on Debian
  • 64-bit distribution capable of running 32-bit applications
  • GNU C Library (glibc) 2.19 or later
  • 4 GB RAM as a minimum; 8 GB RAM recommended
  • 2 GB of available disk space as a minimum; 4 GB recommended (500 MB for the IDE + 1.5 GB for the Android SDK and emulator system image)
  • 1,280 x 800 minimum screen resolution
You can find the code files present in this chapter on GitHub at https://github.com/PacktPublishing/Android-Programming-for-Beginners-Third-Edition/tree/main/chapter%2001.

What's new in the third edition?

The second edition saw huge amounts of additional topics compared to the first edition. Unfortunately, there are only so many pages that can fit in a paperback book. Therefore, this edition focuses on improving the way that the Java, Android, and app development concepts are taught. We have rethought the way that topics are explained and made it more visual than before. In addition, I have managed to squeeze in about a dozen new mini topics. These are either Java fundamentals such as variable types not covered in earlier editions, new Android Studio features such as the profiler, or classic programming concepts such as method recursion and the live debugging of our code. Hopefully, this third edition will therefore make your Android and Java journeys smoother and more complete.

Why Java and Android?

When Android first arrived in 2008, it was a bit drab compared to the much more stylish iOS on the Apple iPhone/iPad. But quite quickly, through diverse handset offerings that struck a chord with both the practical price-conscious as well as the fashion-conscious and tech-savvy, the Android user numbers exploded.
For many, myself included, developing for Android is the most rewarding pastime and business bar none.
Quickly putting together a prototype of an idea, refining it, and then deciding to run with it and wire it up into a fully fledged app is such an exciting and rewarding process. Any programming can be fun, and I have been programming all my life, but creating for Android is somehow extraordinarily rewarding.
Defining exactly why this is the case is quite difficult. Perhaps it is the fact that the platform is free and open source. You can distribute your apps without needing the permission of a big, controlling corporation – nobody can stop you. At the same time, you have well-established, corporate-controlled mass markets such as Amazon Appstore and Google Play.
More likely, the reason why developing for Android gives such a good feeling is the nature of the devices themselves. They are deeply personal. You can develop apps that interact with people's lives – educate, entertain, tell a story, and so on – and it is there in their pockets ready to go, in the home, in the workplace, or on holiday.
You can certainly build something bigger for the desktop. But knowing that thousands (or millions) of people are carrying your work in their pockets and sharing it with friends gives more than just a buzz.
In fact, developing for Android is considered highly skillful and the most successful developers are hugely admired, even revered.
If all this fluffy and spiritual stuff doesn't mean anything to you, then that's fine too; developing for Android can make you a living or even make you wealthy. With the continued growth of device ownership, the ongoing increase in CPU and GPU power, and the non-stop evolution of the Android operating system itself, the need for professional app developers is only going to grow.
In short, the best Android developers – and, more importantly, the Android developers with the best ideas and most determination – are in greater demand than ever. Nobody knows who these future Android app developers are and they might not even have written their first line of Java yet.
So, why isn't everybody an Android developer? Obviously, not everybody will share my enthusiasm for the thrill of creating software that can help people make their lives better, but I am guessing that because you are reading this, you might!

The beginner's first stumbling block

Unfortunately, for those that do share my enthusia...

Inhaltsverzeichnis