01 introduction & setup - android
DESCRIPTION
Basic Introduction anTRANSCRIPT
![Page 1: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/1.jpg)
Introduction to Android OS
Workshop India
![Page 2: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/2.jpg)
What is Android?» Android is a mobile phone operating system
maintained by google.
» Open Source Software Stack that hardware manufacturers can use free of cosr on their devices.
» Allows software developers a unified framework in developing and distributing mobile applications
![Page 3: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/3.jpg)
Components» Android is simply a linux kernel modified and
developed for maintaining mobile devices.
» Linux Kernel: ˃ provides abstraction between the hardware and the rest of the stack, ˃ responsible for device drivers (Camera , Wi Fi, etc…), ˃ resources management , power management, security and net working
» C/C++ Libraries: ˃ such as SQL lite, Graphics libraries OpenGL ES, media framework and
webkit layout engine.
![Page 4: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/4.jpg)
The Android Runtime» The Core libraries provide most of java libraries +
additional Android libraries.
» The Dalvik VM provides (Just In Time) JIT compilation.
» Each Java application accessing the core libraries has its own VM. ˃ This VM is based on the Java bytecoding engine.
![Page 5: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/5.jpg)
App Framework» The Android Application Framework:
˃ Provides classes required to develop an Android application ˃ abstraction between hardware access˃ the Android Java API’s main library include telephony, content providers
(data), resources, locations and UI.
» Application Layer: all Android applications(native or third party) are built on the application layer using the same API
» The core subsystem does not distinguish between native (already on the phone) and 3rd party (what could be installed by user)
![Page 6: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/6.jpg)
Android Versions» Each Android version has a name of a dessert.
» Android 1.x (Cup Cake).» Android 1.x (Donut).» Android 2.x (Eclair).» Android 2.x (Froyo).» Android 2.x (Gingerbread).» Android 3.x (Honeycomb)» Android 4.x (Ice Cream Sandwich)» Android 5.x (JellyBean)
![Page 7: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/7.jpg)
Hardware Companies» Any hardware developer can use android on a device,
provided he can get the linux drivers for android working on his hardware.
» Google phones always use the latest android update. Everybody else waits and develops .
» Most 3rd party OEMs use older versions of android.
» Android can be used as a platform for any handheld mobile hardware device usable by anybody in the market for free.
![Page 8: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/8.jpg)
Working with Android» Android application follow complete java
development standards.
» All applications run inside a Java virtual machine.
» First thing to do is to get an updated version of java onto your system
» Make sure you have the latest jdk installed on your system. (7u5 as of now..)
![Page 9: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/9.jpg)
SDK» Android has a software development kit manager.
» Different versions of Android support different platforms.
» You need to compile your android application against the SDK version you want to support on the device.
» We have an SDK manager that would help us do the needful.
![Page 10: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/10.jpg)
Starting Installation of the SDK» http://developer.android.com/sdk/index.html
» Once you’ve installed it, an SDK manager should appear in the windows menu. Open it.
» Check the following entries ˃ Tools/Android SDK tools˃ Tools/Android SDK platform-tools˃ Android 3.2 (API13)/SDK platform˃ Android 3.2 (API13)/Samples for SDK˃ Android 3.2 (API13)/Google APIs
» And click install. Select Agree in the window and install.
» Default installation location : …\appdata\local\android\
![Page 11: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/11.jpg)
![Page 12: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/12.jpg)
Development IDE’s» Eclipse is the tool of choice as purported by
google.
» IntelliJ IDEA IDE also has good android development support and is as good to use.
» Either of the IDE’s is acceptable.
![Page 13: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/13.jpg)
ADT plugin for eclipse» Start Eclipse, then select Help > Software Updates > Find and Install….» In the dialog that appears, select Search for new features to install and
press Next.» Press New Remote Site.» In the resulting dialog box, enter a name for the remote site (e.g. Android
Plugin) and enter this as its URL: ˃ https://dl-ssl.google.com/android/eclipse/.
» Press OK.
» Wait for completion.
» Select Window > Preferences… to open the Preferences panel. (Mac OS X: Eclipse >Preferences)Select Android from the left panel.For the SDK Location in the main panel, press Browse... and find the SDK root directory.
» Press Apply, then OK
![Page 14: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/14.jpg)
AVM – Android Virtual Machine» If you do not have an Android Hardware Device,
you can use the AVM to emulate an android device and test applications on your computer.
» You will learn patience by using the AVM.
» AVM Manager can be launched from ˃ Tools > Manage AVDs from the SDK manager application˃ Eclipse menu (ex : find it yourself)
![Page 15: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/15.jpg)
![Page 16: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/16.jpg)
Select New AVD» Give a nice name to your AVD
» Target will be available depending on what all SDK have been downloaded onto your system.
» ENABLE SNAPSHOT (for faster loading)
» In hardware,˃ Increase device RAM to suitable level˃ Leave hardware settings to default
» Add avd and click start in the manager it!
» ..patience..
» You can keep the emulator running throughout your development period or as long as it keeps functioning.
ENABLE THIS!!
![Page 17: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/17.jpg)
![Page 18: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/18.jpg)
Editing Run COnfigs
This is best option..
![Page 19: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/19.jpg)
Alternative SOlution» Install VirtualBox
» Install Android Inside Virtual Box
» Connect eclipse to the android instance inside Vbox
» http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/
» http://www.andreybutov.com/2011/10/14/how-to-set-up-a-faster-android-emulator/
» For more details..
![Page 20: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/20.jpg)
Android Funda» Android devices come in all different sizes.
» Stretch and compress your layouts to accommodate various heights and widths.
» Be flexible and creative.
» Should look GOOD!
![Page 21: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/21.jpg)
ICE cream Sandwich» ICS is first OS that unified both tablet and phone
experience.
» ICS however uses these features prominently with some minor changes.
![Page 22: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/22.jpg)
COmponentsPersistent Action bar on top
Honeycomb,ICS hardware requirements ask for NO buttons except for power and volume.Hence, the menu – time – back and recent buttons are combined in the bottom black bar.
Tablets have a different potrait – landscape view so apps must be designed accordingly.
![Page 23: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/23.jpg)
Richer Notifications» In ICS, notifications can be made the center of the
user’s experience, with real time updates and specificatons.
» A new builder class will allow you to create notifications with• large and small icons,• a title,• a priority flag,
» These notifications build upon the expanded set of UI Widgets that will now be available as remote Views.
![Page 24: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/24.jpg)
igh Performance 2D and 3D Graphics
» This new feature is a platform that includes flexible animation framework that makes it easy for you to animate the properties of UI elements like
»• Views,• Widgets,• Fragments,• Drawables,• or any arbitrary object.
» These animations can fade between states, add movement, loop an animated image or an already moving animation, change item colors, and more.
![Page 25: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/25.jpg)
Renderscript 3D Graphics Engine» This framework lends both the API for building 3D scenes and a
platform-independent shader language for max performance.
» With Renderscript you’ll be able to accelerate both data processing and graphics operations, ˃ With multiprocessor˃ And GPU support
» Supported Applications:• Canvas,• Paint,• Xfermode,• ColorFilter,• Shader,
![Page 26: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/26.jpg)
Supporting both phones and tablets» Tablets offer more space in which your application
can present multiple sets of information at once,
» handset device usually requires that you split those sets apart and display them separately.
» http://developer.android.com/guide/practices/screens_support.html
» Creativity. Design -> Development
![Page 27: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/27.jpg)
Fragmented Design
![Page 28: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/28.jpg)
Action Bar and Buttons
![Page 29: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/29.jpg)
New things to note» Social API
˃ A shared social provider and API provide a new unified store for contacts, profile data, stream items, and photos
» Calendar API˃ A shared calendar content provider and framework API make it easier for
developers to add calendar services to their apps.
» Android Beam˃ Android Beam is an NFC-based feature that lets users instantly share
information about the apps they are using, just by touching two NFC-enabled phones together.
![Page 30: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/30.jpg)
New things to note» Low-level streaming multimedia
˃ Android 4.0 provides a direct, efficient path for low-level streaming multimedia. The new path is ideal for applications that need to maintain complete control over media data before passing it to the platform for presentation
» New camera capabilities˃ Developers can take advantage of a variety of new camera features in
Android 4.0. ZSL exposure, continuous focus, and image zoom let apps capture better still and video images, including during video capture
» Wi-Fi Direct˃ Developers can use a framework API to discover and connect directly to
nearby devices over a high-performance, secure Wi-Fi Direct connection. No internet connection or hotspot is needed.
![Page 31: 01 introduction & setup - Android](https://reader036.vdocuments.net/reader036/viewer/2022081516/555a040dd8b42ad00a8b512f/html5/thumbnails/31.jpg)
How to be an android developer» KEEP READING THE INTERNET!!
» Go to various android news sites, keep in touch with latest android news and announcements over there.
» Learn things outside this course. Lots of tutorials available online
» Try things in the emulator patiently.. ˃ Try Try Try and then Try again once more…˃ And then once again..˃ And again..˃ Till you accomplish what you need.
» Ask people online for advice ˃ (only after your research is over!!)