2. Create your first android application using Java & Firebase
Android Study Jam
3. About the speaker
Abderrahmane SAOUDI
→ Organizer @GDG Ghardaia
→ Graphic Designer
→ Android Developer
→ Notion Professional User
4. Android Study Jam
• Introduction to Android Studio
• Android Studio User Interface
• XML (eXtensible Markup Language)
• Java Programming Language
• What is Firebase?
• Example
• Conclusion
Agenda :
5. Android Study Jam
Android Studio
Android Studio is the official Integrated
Development Environment (IDE) for
Android app development, based on
IntelliJ IDEA .
6. Android Study Jam
Android Studio User Interface
1. Toolbar lets you carry out a wide range of
actions.
2. Navigation bar helps you navigate through
your project and open files for editing.
3. Editor window is where you create and modify
code. Depending on the current file type, the
editor can change.
4. Tool window bar contains the buttons that
allow you to expand or collapse individual tool
windows.
5. Tool windows give you access to specific
tasks. You can expand them and collapse them.
6. Status bar displays the status of your project
and the IDE itself, warnings or messages.
7. Android Study Jam
Android Studio Structure
● manifest: Every app project must have an
AndroidManifest.xml file at the root of the project
source set. It describes essential information
about your app.
● java: This is the folder in your project where you
will be storing all of the source code files written in
Java programming language.
● res: It contains folders that help you separate and
sort the resources of your application.
● Gradle Scripts: The gradle scripts folder contains
the scripts used to build the app are: configuration
files, properties files, and setting files.
8. Android Study Jam
XML used to store and organize data. It's easily
scalable and simple to develop.
In Android, the XML is used to implement UI-
related data, and it's a lightweight markup
language that doesn't make layout heavy.
XML only contains tags, while implementing they
need to be just invoked.
XML (eXtensible Markup Language)
XML Syntax
9. Android Study Jam
XML Syntax
<Item library:attribute_1="value1"
library:attribute_2="value2">
. . .
</Item>
<Item library:attribute_1="value1"
library:attribute_2="value2"/>
<?xml version="1.0" encoding="utf-8" ?>
10. Android Study Jam
Java Programming Language
Java is an object-oriented programming language
that produces software for multiple platforms.
When a programmer writes a Java application, the
compiled code runs on most operating systems
(OS).
Java is used to develop mobile apps, web apps,
desktop apps, games and much more.
11. Android Study Jam
Variables in Java
Variable in Java is a data container that stores the data values during Java program execution.
Every variable is assigned data type which designates the type and quantity of value it can hold.
Variable is a memory location name of the data.
● Primitive :
○ byte
○ int
○ double
○ float
○ char
○ boolean
. . .
● Non-Primitive :
○ String
○ Array
○ Class
. . .
12. Android Study Jam
Expressions in Java
An expression is a combination of operators, constants
and variables. An expression may consist of one or
more operands, and zero or more operators to
produce a value.
13. Android Study Jam
Flow controls in Java
Decision Making in programming is similar to
decision making in real life. In programming also
face some situations where we want a certain
block of code to be executed when some
condition is fulfilled.
If (condition) {
// Executes this block if condition
is true.
}
Else {
// Executes this block if condition
is false.
}
variable = (condition)? value_if_true : value_if_false;
switch (variable) {
case value1:
// Some code to execute.
break;
case value2:
// Some code to execute.
break;
default:
// Some code to execute.
break;
}
15. Android Study Jam
Loops in Java
Looping in programming languages is a feature
which facilitates the execution of a set of
instructions repeatedly while some condition
evaluates to true.
for (initialization expr; test expr; update expr)
{
// loop statements...
}
for (int i=0; i<5; i++)
{
System.out.println ("GDG Ghardaia");
}
do {
// loop statements...
} while (condition);
int i=0;
do {
System.out.println ("GDG Ghardaia");
i++;
} while (i<5);
while (condition) {
// loop statements...
}
int i=0;
while (i<5) {
System.out.println ("GDG Ghardaia");
i++;
}
16. Android Study Jam
Firebase is an app development platform
that helps you build and grow apps and
games users love. Backed by Google and
trusted by millions of businesses around
the world.
Firebase Database
17. Android Study Jam
Grow and engage users
Analytics
Predictions
Cloud
Messaging
Remote
Config
A/B Testing
Dynamic
Links
In-app
Messaging
Improve app quality
Crashlytics
Performance
Monitoring
Test Lab
App Distribution BETA
Build better apps
Auth
Cloud
Functions
Cloud
Firestore
Hosting
ML Kit
Realtime
Database
Cloud
Storage
Extensions
19. Android Study Jam
Open your laptop, in Android studio try to
complete this exercise :
Create Android application with TextView and
Button. When the button clicks it sends the
number to Firebase and increment it by 1.
Let Make it Real !
5
INCREASE