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

Partager le livre
  1. 742 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Android Programming for Beginners

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

John Horton

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Android Programming for Beginners est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Android Programming for Beginners par John Horton en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatique et Programmation d'appareils mobiles. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2021
ISBN
9781800566446

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...

Table des matiĂšres