Get Started with Android - Session 1
-
Upload
umadeveloper -
Category
Education
-
view
504 -
download
0
Transcript of Get Started with Android - Session 1
![Page 1: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/1.jpg)
Get Started with Android
By : Ahmed Mohamed Ali
![Page 2: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/2.jpg)
Session 1
![Page 3: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/3.jpg)
Agenda
▪ What is Smartphone ?
▪ Sample Applications
▪ Smartphones Operating System
▪ Comparison between Android and IOS
▪ What is Android ?
▪ Why Android ?
▪ Android History
▪ Android Versions
▪ Android Architecture
▪ Dalvik JVM
▪ How to start with Android ?
▪ Android Native
▪ Install Android IDE
▪ Activity Life Cycle
▪ Create Simple Project
![Page 4: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/4.jpg)
What is Smartphone ?
▪ Smartphones which includes functions similar to those found on personal computers.
▪ Smartphones provide a one stop solution for information management , mobile calls , email sending , and internet access .
▪ Smartphones are compact in size and often only slightly bigger than standard mobile telephone .
![Page 5: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/5.jpg)
Advantages of Mobile Phones
Easy Communication Always Connected Multiple Uses
![Page 6: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/6.jpg)
Disadvantages of Mobile Phones
Constant Interruption Leak Privacy Distraction
![Page 7: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/7.jpg)
Sample Applications
![Page 8: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/8.jpg)
Sample Applications(Arabic)
![Page 9: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/9.jpg)
Applications with one Billion Downloads
Application Developer Data Reached
Gmail Google 2014-05-06
Google Maps Google 2014-05-28
Youtube Google 2014-07
Facebook Facebook 2014-09-02
Whatsapp Inc Whatsapp Inc 2015-03-04
Messenger Facebook 2015-06-06
Google Hangouts Google 2015-06-14
Google Chrome Google 2015-06-14
![Page 10: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/10.jpg)
How to Earn Money from Android Apps
▪ Advertising
▪ In-app purchase
▪ Partnerships & Sponsorships
▪ Paid Apps
▪ Mobile Data Analysis
▪ White label
![Page 11: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/11.jpg)
Smartphones Operating System
1- Android
2- Apple IOS
3- Windows Phone
4- BlackBerry OS
5- Amazon
![Page 12: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/12.jpg)
Android as Operating System
![Page 13: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/13.jpg)
Number of Applications (Market Share)
![Page 14: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/14.jpg)
Comparison between Android and IOS
Android IOS
Developer Google Apple
Initial release September 23, 2008 July 29, 2007
Source model Open Source Closed Source
Available on Many phones and tablets, including Kindle Fire(modified android), LG, HTC, Samsung, Sony, Motorola, Nexus, and others. Also, Google Glasses
iPod Touch, iPhone, iPad, Apple TV (2nd and 3rd generation)
Messaging Google Hangouts iMessage
App store Google Play Apple Store
![Page 15: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/15.jpg)
Comparison between Android and IOS
Android IOS
OS family Linux OS X, UNIX
Programmed in C, C++, Java C, C++, Objective-C, Swift
Internet browsing Google Chrome Mobile Safari
Voice commands Google Now Siri
Maps Google Maps Apple Maps
Available language(s) 32 Languages 34 Languages
Device manufacturer Google, LG, Samsung, HTC, Sony, ASUS, Motorola, and many more
Apple Inc
![Page 16: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/16.jpg)
Challenge 1
![Page 17: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/17.jpg)
What is Android ?
▪ Android is an operating system for mobile devices such as smartphones and tablet computers.
▪ Android has beaten Apple iOS, being the leading mobile operating system from first quarter of 2011
![Page 18: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/18.jpg)
Why Android ?
Open Source
Large Developer Community
Reach
Increased Marketing
Reduced Cost of Development
Rich Development Environment
Higher Success Ratio
![Page 19: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/19.jpg)
19
Android history
Google buys Android from the Android Inch
Open Handset Alliance (OHA) created for open standards for mobile devices. Partners of OHA: Google, Motorola, Samsung, Vodafone, T-Mobile, etc
Android 1.0 Released
The first Android smartphone: G1 HTC-Dream
Android 1.1 Released
Android 1.5 (CupCake) Released
2005
2006
2007
2008
2009
Time
![Page 20: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/20.jpg)
20
Android history
Android 1.6 (Donut) Released
Android 2.0 (Eclair) Released
Android 2.2 (Froyo) Released
Android 2.3 (Gingerbread) Released
Android 3.0 (Honeycomb) Released (First version
for devices with larger screens such as tablets)
Android 4.0 (Ice-Cream Sandwich) Released. (It merges the 3.x tab centric design and the v2.x phone based design into a single version.)
2008
2009
2010
2011
2012
Time
![Page 21: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/21.jpg)
Android Versions
![Page 22: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/22.jpg)
Android runs on these devices
Smartphones Tablets Android TV
Android Wear Google Glasses
![Page 23: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/23.jpg)
Android Architecture
23
Built on top of Linux kernel (v. 2.6-3.0)
Advantages:
Portability (i.e. easy to compile on different harwdarearchitectures)
Security (e.g. secure
multi-process environment)
PowerManagement
![Page 24: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/24.jpg)
Android Architecture
24
Native Libraries (C/C++ code)
Graphics (Surface
Manager)
Multimedia (Media
Framework)
Database DBMS (SQLite)
Font Management (FreeType)
WebKit
C libraries (Bionic)
….
![Page 25: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/25.jpg)
Android Architecture
25
Application Libraries(Core Components of Android)
Activity Manager
Package Manager
Telephony Manager
Location Manager
Contents Provide
Notification Manager
….
![Page 26: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/26.jpg)
Android Architecture
26
Applications(Written in Java code)
Android Market
Entertainment
Productivity
Personalization
Education
Geo-communication
….
![Page 27: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/27.jpg)
Android Architecture
27
Dalvik Virtual Machine (VM)
Novel Java Virtual Machine implementation (not using the Sun JVM)
Open License (Sun JVM is not open!)
Optimized for memory-constrained devices
Faster than Sun JVM
….
![Page 28: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/28.jpg)
Android Activity Life Cycle
![Page 29: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/29.jpg)
29
Dalvik Java Virtual Machine (JVM)
Java Source Code
Java Byte Code
Java Virtual Machine (JVM)
Java Source Code
Java Byte Code
Dalvik Byte Code
Dalvik Virtual Machine (VM)
JavaCompiler
JavaCompiler
DexCompiler
Stack-basedbyte-code
Register-basedbyte-code
Java Standard Edition
![Page 30: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/30.jpg)
Your Way to Android
▪ Building native applications means using the native language of the platform such as Java on Android.
▪ The main advantage of native applications is their performance .
▪ Best performance includes fast and fluid animations as well as full access to phone hardware, multi touch support and the latest APIs.
▪ Hybrid applications are web applications (or web pages) in the native browser, such as WebView in Android.
▪ Hybrid apps are developed using HTML, CSS and Javascript, and then wrapped in a native application using platforms like Cordova.
Native Hybrid
![Page 31: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/31.jpg)
How to start Android Native ?
▪ Learn Java Basics
▪ Learn Java OOP
▪ Practice .. Practice .. Practice
▪ Install Android IDE
▪ Learn XML for Design
▪ Learn SQLite for Database
▪ Learn Android
![Page 32: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/32.jpg)
Types of Java
▪ Java Standard Edition (Java SE)
Example : Standalone Applications Like Paint , Library Management System
▪ Java Enterprise Edition (Java EE)
Example : Web Applications Like Online Hotel Reservation System
▪ Java Micro Edition (Java ME)
Example : Smart Cards
![Page 33: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/33.jpg)
Java Important Terms
▪ Basic Data Types
▪ Basic Operations
▪ Decision Making (IF)
▪ Loop Control
▪ Strings
▪ Arrays
▪ Methods
▪ Classes and Objects
▪ Inheritance
▪ Polymorphism
▪ Abstraction
▪ Encapsulation
▪ Packages
![Page 34: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/34.jpg)
XML Example
<Button
android:id="@+id/button_send“
android:layout_width="wrap_content
android:layout_height="wrap_content“
android:text="@string/button_send“
android:onClick="sendMessage"
android:background="@drawable/button_custom" />
![Page 35: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/35.jpg)
Android Components
Activities They dictate the UI and handle the user interaction to the smart phone screen
Services They handle background processing associated with an application.
Broadcast Receivers They handle communication between Android OS and applications.
Content Providers They handle data and database management issues.
![Page 36: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/36.jpg)
What we need to Practice ?
▪ Install JDK 7 or 8 .
▪ Install Android Studio .
▪ Download SDK and APIs Package
▪ Create Emulator (AVD , Genymotion , Real Device).
![Page 37: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/37.jpg)
Download and Install JDK
▪ Open Oracle Official Website .
▪ Choose the suitable jdk package .
▪ http://www.oracle.com/technetwork/java/javase/downloads/index.html
▪ Double Click on the downloaded file and install it .
▪ Go to C:\Program Files\Java To make sure .
![Page 38: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/38.jpg)
Download and Install Android Studio
▪ Open Android Offical Official Website .
▪ Download Android Studio
▪ https://dl.google.com/dl/android/studio/install/1.5.1.0/android-studio-bundle-141.2456560-windows.exe
▪ Double Click and Install it.
![Page 39: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/39.jpg)
Download and Install Android Studio
![Page 40: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/40.jpg)
Download and Install Android Studio
![Page 41: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/41.jpg)
Download and Install Android Studio
![Page 42: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/42.jpg)
Download and Install Android Studio
![Page 43: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/43.jpg)
Create a Project
![Page 44: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/44.jpg)
Create a Project
![Page 45: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/45.jpg)
Create a Project
![Page 46: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/46.jpg)
Create a Project
![Page 47: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/47.jpg)
Create a Project
![Page 48: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/48.jpg)
Project Folders and Files
▪ Three Main Folders
1- manifests
2- java
3- res
![Page 49: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/49.jpg)
Create Emulator
▪ Android Studio AVD
▪ Genymotion
▪ Real Device
![Page 50: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/50.jpg)
Important Terms (for more information)
▪ UI and UX
▪ Material Design
▪ Ideation
▪ Entrepreneurship
▪ Startups
![Page 51: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/51.jpg)
Resources to Start Android
▪ MAL - Mobile Application Launchpad
http://www.mobileapplaunchpad.com.eg/
▪ Udacity Courses
https://www.udacity.com/courses/android
▪ Android Official Website
http://developer.android.com/index.html
▪ Tutorialspoint Android
http://www.tutorialspoint.com/android
![Page 52: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/52.jpg)
Contact Me
Blog :
www.ahmedmohamedali.blogspot.com
Facebook :
www.fb.com/um.adeveloper
https://www.linkedin.com/in/umadeveloper
![Page 53: Get Started with Android - Session 1](https://reader031.fdocuments.us/reader031/viewer/2022022203/5875ef2f1a28ab006e8b46b1/html5/thumbnails/53.jpg)
Thanks