Post on 11-Jan-2017
Get Started with Android
By : Ahmed Mohamed Ali
Session 1
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
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 .
Advantages of Mobile Phones
Easy Communication Always Connected Multiple Uses
Disadvantages of Mobile Phones
Constant Interruption Leak Privacy Distraction
Sample Applications
Sample Applications(Arabic)
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
How to Earn Money from Android Apps
▪ Advertising
▪ In-app purchase
▪ Partnerships & Sponsorships
▪ Paid Apps
▪ Mobile Data Analysis
▪ White label
Smartphones Operating System
1- Android
2- Apple IOS
3- Windows Phone
4- BlackBerry OS
5- Amazon
Android as Operating System
Number of Applications (Market Share)
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
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
Challenge 1
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
Why Android ?
Open Source
Large Developer Community
Reach
Increased Marketing
Reduced Cost of Development
Rich Development Environment
Higher Success Ratio
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
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
Android Versions
Android runs on these devices
Smartphones Tablets Android TV
Android Wear Google Glasses
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
Android Architecture
24
Native Libraries (C/C++ code)
Graphics (Surface
Manager)
Multimedia (Media
Framework)
Database DBMS (SQLite)
Font Management (FreeType)
WebKit
C libraries (Bionic)
….
Android Architecture
25
Application Libraries(Core Components of Android)
Activity Manager
Package Manager
Telephony Manager
Location Manager
Contents Provide
Notification Manager
….
Android Architecture
26
Applications(Written in Java code)
Android Market
Entertainment
Productivity
Personalization
Education
Geo-communication
….
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
….
Android Activity Life Cycle
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
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
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
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
Java Important Terms
▪ Basic Data Types
▪ Basic Operations
▪ Decision Making (IF)
▪ Loop Control
▪ Strings
▪ Arrays
▪ Methods
▪ Classes and Objects
▪ Inheritance
▪ Polymorphism
▪ Abstraction
▪ Encapsulation
▪ Packages
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" />
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.
What we need to Practice ?
▪ Install JDK 7 or 8 .
▪ Install Android Studio .
▪ Download SDK and APIs Package
▪ Create Emulator (AVD , Genymotion , Real Device).
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 .
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.
Download and Install Android Studio
Download and Install Android Studio
Download and Install Android Studio
Download and Install Android Studio
Create a Project
Create a Project
Create a Project
Create a Project
Create a Project
Project Folders and Files
▪ Three Main Folders
1- manifests
2- java
3- res
Create Emulator
▪ Android Studio AVD
▪ Genymotion
▪ Real Device
Important Terms (for more information)
▪ UI and UX
▪ Material Design
▪ Ideation
▪ Entrepreneurship
▪ Startups
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
Contact Me
Blog :
www.ahmedmohamedali.blogspot.com
Facebook :
www.fb.com/um.adeveloper
https://www.linkedin.com/in/umadeveloper
Thanks