My First Mobile App for Students : A comprehensive guide to Android app development for beginners

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn the basics of Kotlin and build your first Android app. Key Features: - Build real-world apps from scratch with UI and coding. - Learn about the latest trends in Android development, including modern architecture patterns, UI design principles, and the Jetpack suite of libraries. - Discover how Kotlin can make your Android development more efficient and productive. Description: In the digital age, mobile apps are the primary way for businesses and individuals to connect with their audience. Android is the leading platform, with a 71% market share worldwide and over 2.87 billion apps. If you are an aspiring app developer, this book is the perfect place to start. The book focuses on hands-on learning, taking you through the process of transforming your ideas into reality. Starting with the basics, you will learn how to set up Android Studio and master Kotlin fundamentals. You will then build on the Android Jetpack library to create a strong architectural foundation for your apps. Along the way, you will create six fully-functional apps, complete with UI and coding logic, all powered by Kotlin. We start at the beginning, covering the basics you need to know. We will guide you through setting up the tools you will use, like Android Studio, and teach you about Kotlin, the language used for creating Android apps. By the end, you will have a solid foundation to build upon. Learning is best when you actually do things, so this book is all about hands-on experience. You will create six different apps, each with its own unique design and coding. This way, you will turn what might seem complex into something practical and understandable. As you work through the chapters, you will pick up new skills. You will learn why Kotlin is better than Java for app making, and you will become comfortable with Android Studio. You will also get the hang of designing the look of your apps and making them work smoothly. By the end of this journey, you will be equipped with the knowledge to build apps with confidence. You will understand the ins and outs of app creation, from the basics like setting up the environment to more advanced topics like connecting to the cloud. Whether you are just starting out or already have some tech experience, this book is your companion in your adventure of creating Android apps. What you will learn: - Build functional Android apps with UI and coding proficiency. - Master Kotlin's syntax and replace Java for app development. - Implement UI elements, event handling, data passing, and animations. - Build apps using Android Jetpack architecture and modern tools. - Leverage coroutines to integrate web services and Retrofit libraries. - Design apps with data persistence, SQL, Room Framework, and Firebase. Who this book is for: This book is for anyone who wants to learn how to develop Android apps. Whether you are a novice or a seasoned professional, this book will teach you the skills you need to create high-quality apps.

Author(s): Zaid Kamil;
Publisher: BPB Publications
Year: 2024

Language: English
Pages: 360

Cover
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgements
Preface
Table of Contents
1. Welcome, Future App Developer
Introduction
Structure
Objectives
History of Android OS
History of Kotlin
Market impact of Mobile operating systems
Setting up Android Studio
Windows installation
Mac installation
Linux installation
Android SDK setup
Kotlin classes and objects
Class in Kotlin
Object in Kotlin
Functions and variables in Kotlin
Function
Variables
Conditions and loops
If expression
When expression
Loops
For
While
Conclusion
Points to remember
Exercises
2. App 1—Dynamic Dice Simulator (Part 1)
Introduction
Structure
Objectives
Android project wizard
Android studio interface
Android app project structure
Android design editor interface
Adding drawables
View
Viewgroups
ConstraintLayout
Adding TextView
Adding button
Adding ImageView
XML editor
Editing attributes of views
Coding Kotlin function
Activity and types of activities
Event listener
Emulator
Developer mode in Android phones
Running the app
Gradle build
Conclusion
Exercises
3. App 1—Dynamic Dice Simulator (Part 2)
Introduction
Structure
Objectives
Multiple activities in app
Intent
Types of Intent
Companion object in Kotlin
Passing data through intent
Intent filter
Android manifest
Motion layout
Motion editor
Motion scene
Transition
Finishing up the app
Conclusion
Exercises
4. App 2—State Trivia
Introduction
Structure
Objectives
Collection and generics
Model and data class
Data class
Create the new app
Data source
Material design
Updating to Material 3 theme
Changing the app icon
ViewBinding
Enabling the ViewBinding
Gradle sync
Creating the scrollable list
RecyclerView
Single element layout
CardView
Adapter for RecyclerView
Abstract methods
Constructor for the adapter
ViewBinding inside the adapter
Passing the data to ViewHolder
Setting the size of items
ViewHolder
The full Adapter class code
Completing the RecyclerView
Changing the layout
Options menu
The click functionality
Conclusion
Exercises
5. App 3—Movie Booking
Introduction
Structure
Objectives
What is fragment?
Fragment lifecycle
The basic activity
NavHostFragment
Android jetpack
Creating a new project
Setting up the fragments
Rename existing fragment
Create a new package
Creating new fragments
Update fragment labels
Kotlin getter and backing properties
Updating fragment default code
Fix new fragments
Create a user interface for each fragment
fragment_intro.xml
fragment_day_select.xml
fragment_time_select.xml
fragment_seat_select.xml
fragment_payment.xml
fragment_confirm.xml
fragment_receipt.xml
Navigation graph
MVVM architecture in Android
DataBinding
Updating the build.gradle file
ViewModel
Shared ViewModel
Creating the ViewModel
LiveData
Immutable versus mutable LiveData
Updating the ViewModel
ViewModel + DataBinding in Layout files
fragment_intro.xml
fragment_day_select.xml
fragment_time_select.xml
fragment_seat_select.xml
fragment_payment.xml
fragment_confirm.xml
fragment_receipt.xml
Lifecycle observer
Completing the fragments
IntroFragment.kt
DaySelectFragment.kt
TimeSelectFragment.kt
SeatSelectFragment.kt
PaymentFragment.kt
ConfirmFragment.kt
ReceiptFragment.kt
Running the app
Conclusion
Exercises
6. App 4—Book Finder
Introduction
Structure
Objectives
Multithreading
Coroutines
Web services and networking
The Google Books API
Setting up the new project
Retrofit service
Moshi and data conversion
Permission in Android
Creating the Project UI
Update strings.xml
Update navigation graph
Update activity_main.xml layout
Change fragment_search.xml layout
Change fragment_result.xml
Edit the book_card_view.xml
Integrating the code
Creating the BookViewModel
Editing the SearchFragment
Editing the ResultFragment
Handling the BookAdapter
BindingAdapter
Adding the data binding to layout
Running the app
Conclusion
Exercises
7. App 5—Flash Cards (Part 1)
Introduction
Structure
Objectives
The concept of database
Local databases
Remote databases
Table, columns and rows
Tables
Columns
Rows
Datatypes
Primary key
SQL and basic queries
SELECT
INSERT
UPDATE
DELETE
Room library
Creating the new project
Adding room dependency
Entity in room
Data Access Object
Creating the database
Attaching the database with application
Conclusion
Exercises
8. App 5—Flash Cards (Part 2)
Introduction
Structure
Objectives
Fetching data using flow
ViewModel and DAO
ViewModelFactory and DAO
Adding data
The layout design
Add the resource strings
The fragment’s code
Setting the home screen with ViewPager
ViewPager2
The layout design
The fragment’s code
Setting up the ListAdapter
Adding more functionality
View and delete item
The layout
Kotlin code
Navigation graph implementation
Editing item
The layout
Kotlin code
Navigation graph implementation
Running the app
Conclusion
Exercise
9. App 6—Inspire Me
Introduction
Structure
Objectives
Cloud services
Setting up the project
Fragments
ViewModels
Adapter
Navigation graph
Layouts
Model
Drawables
BindingUtil.kt
Menu
Strings.xml
App’s project structure
Firebase integration
Firebase console
Firebase authentication
Firebase Firestore
Project UI and layout
activity_auth.xml
fragment_login.xml
fragment_register.xml
post_card.xml
fragment_display.xml
fragment_add.xml
ViewModels
CloudAuthViewModel
FirebaseViewModel
Navigation graph
Fixing the menu
Adapter
Implementation of fragments
LoginFragment
RegisterFragment
DisplayFragment
AddFragment
Uploading apps to GitHub
Running the app
Conclusion
Exercises
Index