This is the part 1 the Tehran's 1st Android Bootcamp presentation held by Tehran Municipality. It's an introduction to Android.
It also starts with a "Hello World" project and how to get start with development tools.
by: Mohsen Mirhoseini Argi
4. Android…
• Is an open source platform designed for mobiles
devices under licenses (Apache/MIT)
• Is based on the open Linux kernel
– Portability: easy to compile on various hardware
– Security: a highly secure system
– Features: support for memory management, power
management, and networking
• Championed by Google
• Separates the hardware from the software
• Core is designed to be portable to run on all sorts of
physical devices and screen size
5. Android…
• For Developers:
– Provides all tools for developing mobile apps quickly and
easily
– Don’t even need a physical phone to start developing
• For Users:
– Can customize their phone experience
• For Manufacturers:
– Complete solution for running their devices
– Other than some hardware-specific drivers, provides
everything else to make their devices work.
6.
7.
8. History
• In 2005, Google buys Android, Inc.
• Everything goes quiet for a while!
• In 2007, the Open Handset Alliance is announced. Android is
officially open sourced.
• In 2008, the Android SDK 1.0 is released. The G1 phone,
manufactured by HTC and sold by the wireless carrier T-Mobile USA,
follows shortly afterward.
• 2009 sees a proliferation of Android-based devices. New versions of
the operating system are released: Cupcake (1.5), Donut (1.6), and
Eclair (2.0 and 2.1). More than 20 devices run Android.
• • In 2010, Android is second only to Blackberry as the best-selling
smart phone platform. Froyo (Android 2.2) is released and so are
more than 60 devices that run it.
9.
10.
11. Android Versions
Two Pre-commercial internal release versions
(2007–2008)
• Android alpha:
– Released before 5 Nov 2007
– Code-named “Astro Boy”, “Bender”, “R2-D2”
• Android beta:
– Released on 5 Nov 2007 ~ 28 Sep 2008
– Code-named “m3-rc22a”, “m3-rc37a”, …
12. Android Versions
Cupcake 1.5 2009/04/30
• HTC Dream, the first
Android device
• Features: android market,
web browser, camera
support, gmail, Google
contact, calendar, maps,
sync, search, talk, media
player, notification, voice
dialer, you tube, …
13. Android Versions
Donut 1.6 2009/09/15
• based on Linux kernel
2.6.29
• Features: Voice and text
entry search,
Multilingual speech
synthesis, faster camera
access, technology
support for
CDMA/EVDO, 802.1x,
VPNs, …
14. Android Versions
Éclair 2.0, 2.1 2009/10/29
• based on Linux kernel
2.6.29
• Features: Bluetooth 2.1
support, Camera flash
support, digital zoom,
scene mode, white
balance, color effect and
macro focus, live
wallpapers, …
15. Android Versions
Froyo 2.2(frozen yogurt) 2010/05/20
• based on Linux kernel
2.6.32
• Speed, memory, and
performance optimizations,
Android Cloud to Device
Messaging (C2DM), USB
tethering and Wi-Fi
hotspot, file upload fields in
the Browser, Adobe Flash
support, …
16. Android Versions
Gingerbread 2.3 2010/12/06
• based on Linux kernel
2.6.35
• Features: Switched from
YAFFS to ext4,
enhancements for game
developers, Support for
extra-large screen sizes
and resolutions, …
17. Android Versions
Honeycomb 3.0 2011/02/22
• the first tablet-only Android
update
• Linux kernel 2.6.36
• First Tablet, Motorola
Xoom
• Features: Optimized tablet
support, System Bar
(notifications, status, and
soft navigation buttons),
Action Bar, Simplified
multitasking, ...
18. Android Versions
IceCream Sandwich 4.0 2011/10/19
• based on Linux kernel 3.0.1
• compatible with any
Android 2.3.x device
• Features: Multiple user
accounts , Face Unlock,
Google Chrome browser,
syncing users' Chrome
bookmarks, …
19. Android Versions
Jelly Bean 4.2 2012/06/09
• based on Linux kernel 3.0.31
• improving functionality and
performance of user
interface.
• the first device Nexus 7 tablet
• Bi-directional text and other
language support
• Offline voice dictation
20.
21.
22. Android Management Switch Up
Andy Rubin, head of Android at
Google, moved on to a new role
at the company.
Sundar Pichai (Pichai Sundarajan),
head of Chrome and Apps, is now in
charge of Android.
23. Google's Android Statue Gets a Chrome
Update
• The new statue is
mounted on Building
45
• perhaps some sort of
Chrome-Android
integration
• But It Doesn’t Mean
Anything!…
24. Android Next Version
• Google's "sweet" naming convention
• Every major release since Cupcake has been
named after a confection in alphabetical order
• Cupcake > Donut > Eclair > Froyo
> Gingerbread > Honeycomb > IceCream
Sandwich > JellyBean > K...!
29. Installing the Android ADT
• Download ADT, unzip (or on Linux, untar) it into an
easy access folder (for example)
– Windows
• C:appsandroid-adt-windows
– Linux
• /home/YourUserName/android-adt-linux_86
– Mac OS X
• /Users/YourUserName/android-adt-mac_86
• For Windows strongly recommend directories
without spaces
30.
31.
32. Creating a New Project
File→New→Project→Android Application Project
33. Creating a New Project
• In Eclipse choose,
– File→New→Project→Android Application Project
• Application Name:
– The name of your application
• Project Name:
– Eclipse organizes everything into projects
– project name should be one word and CamelCase
• Package Name:
– In Java, all source code is organized into packages
– Your package name (reverse of your domain name)
34. Creating a New Project
• Minimum required SDK:
– minimum version of Android that is required for the
device to run this application
• Target SDK:
– tells the build tools which version of the Android
platform you are building for
• Compile with:
– Typically the most recent version that support all API
• Theme:
– Base theme to user for application
36. Configure New Project
• Create custom launcher icon:
– Check to use a simple icon creator
• Create activity:
– Check to use activity creator tool
• Mark this project as library:
– Check if you want to create a library project to use
in other projects
37.
38.
39. Android Project Important Parts
• Manifest File
• Layout XML Code
• Strings
• The R File
• Java Source Code
40. Manifest File
• Glues everything together
• Explains what the application consists of
• What all its main building blocks are
• What permissions it requires
• What is the application name, application icon
• What is package name, version Code & Name
• …
44. Strings
• XML file that contains all the text that your
application uses:
– names of buttons
– labels
– default text
– and similar types of strings…
45. The R File
Glue between the world of Java and the world of resources
46. The R File
• Glue between the world of Java and the world
of resources
• Automatically generated file, and you never
modify it
• Recreated every time you change anything in
the res directory
48. Java Source Code
• Is what drives everything
• Code that ultimately gets converted to a Dalvik
executable
49.
50.
51. The Emulator
• Is an actual code emulator
• It runs the same code base as the actual device
• Have to create an Android Virtual Device
(AVD), To use the emulator
52. Emulator vs. Simulator
• sound very similar, but are fundamentally
different
• To emulate means to imitate the machine
executing the binary code
• An emulator is sort of like a virtual machine
• A simulator merely simulates the behavior of
the code at a higher level
54. Android Virtual Device (AVD)
• Start the tool called Android SDK and AVD
Manager with in SDK folder
• Choose “New…”
• In Create New AVD dialog window, you must
specify some parameters for your new AVD
56. New AVD Dialog
• Name:
– can be any name you choose
• Device:
– Device that emulator look like
• Target:
– designates which version of Android
– based on platforms and add-ons downloaded and installed
• Keyboard
• Skin
• Front Camera
• Ram, Internal Storage, SD Card