SlideShare ist ein Scribd-Unternehmen logo
1 von 7
What is Android?
• A software platformand operatingsystem for mobile
devices
• Based on the Linux kernel
• Developed by Google and later the Open Handset
Alliance (OHA)
• Allows writingmanaged code in the Java language
• Unveilingof the Android platform was announced on
5 November 2007 with the founding of OHA
November 5, 2007 (Android Birth Day)
• The Android SDK was firstissued as an “early look”
releasein November 2007.
• In September 2008 T-Mobile announced the
availability of the T-Mobile G1, the firstsmartphone
based on the Android Platform.
• In October 2008,Google made the source code of the
Android Platformavailableunder Apache’s open
sourcelicense.
•
Code name
Version
number
API level
(No codename)[2] 1.0 1
(Internally known
as "Petit Four")[2] 1.1 2
Cupcake 1.5 3
Donut[3] 1.6 4
Eclair[4] 2.0 – 2.1 5 – 7
Code name
Version
number
API level
Froyo[5] 2.2 – 2.2.3 8
Gingerbread[6] 2.3 – 2.3.7 9 – 10
Honeycomb[7] 3.0 – 3.2.6 11 – 13
Ice Cream
Sandwich[8]
4.0 – 4.0.4 14 – 15
Jelly Bean[9] 4.1 – 4.3.1 16 – 18
KitKat[10] 4.4 – 4.4.4 19 – 20
Lollipop[12] 5.0 – 5.1.1 21 – 22
Marshmallow[13] 6.0 – 6.0.1 23
Nougat[14] 7.0 – 7.1.2 24 – 25
Oreo[15] 8.0 – 8.1 26 – 27
•
• Most of the application framework accesses these
core libraries through the Dalvik VM, the gateway
to the Android Platform
•
•
•
•
• Android Application Framework
Feature Role
View
System
Used to build an application,includinglists,
grids,textboxes, buttons, and embedded
web browser
Content
Provider
Enablingapplications to access data fromother
applicationsor to sharetheir own data
Resourc
e
Manage
r
Providingaccess to non-code resources
(localized string,graphics,and layoutfiles)
Notifica
tion
Manage
r
Enablingall applicationsto display customer alerts
in the status bar
Activity
Manage
r
Managingthe lifecycleof applicationsand
providinga common navigation backstack
• The media libraries are based on PacketVideo’s
(http://www.packetvideo.com/) OpenCORE.
These libraries areresponsiblefor recording and
playback of audio and video formats. A library
called Surface Manager controls access to the
display systemand supports 2D and 3D.
• The WebKit library isresponsiblefor browser
support; it is the same library thatsupports
Google Chrome and Apple Inc.’s Safari.The
FreeType library isresponsiblefor font support.
• SQLite (http://www.sqlite.org/) is a relational
databasethat is availableon the device itself.
SQLite is also an independent open sourceeffort
for relational databases and notdirectly tied to
Android. You can acquireand use tools meant for
SQLite for Android databases as well.
• Dalvik Virtual Machine (DVM)
o Providingenvironment on which every Android
application runs
o Each Android application runs in its own process,
with its own instanceof the Dalvik VM.
o Dalvik has been written so that a device can run
multipleVMs efficiently.
o Register-based virtual machine
Resumed
In this state, the activity is in the foreground and the
user can interactwith it. (Also sometimes referred to as
the "running" state.)
Paused
In this state, the activity is partially obscured by
another activity—the other activity that's in the
foreground is semi-transparentor doesn't cover the entire
screen. The paused activity does not receive user input
and cannot execute any code.
Stopped
In this state, the activity is completely hidden and
not visibleto the user; it is considered to be in the
background.Whilestopped, the activity instanceand all its
state information such as member variables isretained,
but itcannot execute any code.
The other states (Created and Started) aretransientand
the system quickly moves from them to the next state by
callingthe next lifecyclecallback method. That is,after the
system calls onCreate(),itquickly calls onStart(),which is
quickly followed by onResume().
Defining Main Activity
You can define which activity to use as the main
activity in the Android manifestfile, AndroidManifest.xml,
which is atthe root of your projectdirectory.
The main activity for your app must be declared in
the manifest with an <intent-filter> that includes the
MAIN action and LAUNCHER category.
Module 2
Android SDK
The Android SDK provides you the API libraries and
developer tools necessary to build,test, and debug apps
for Android
Android Directory Structure
Managing Projects
Projects actas containers for storingthings such as
code and resourcefiles.The SDK tools expect your projects
to followa specific structureso itcan compileand package
your application correctly,so itis highly recommended
that you create them with Eclipseand ADT or with
theandroid tool on the command line.
3 types of project
1. Android Projects
2. Test Projects
3. Library Projects
Android Projects
An Android project is the container for your
application'ssourcecode,resource files,and files such as
the Ant build and Android Manifest file.An application
project is the main type of project and the contents are
eventually builtinto an .apk filethat you install on a
device.
Test Projects
These projects contain code to test your
application projects and arebuiltinto applications thatrun
on a device.
Library Projects
These projects contain shareableAndroid source
code and resources that you can reference in Android
projects.This is useful when you have common code that
you want to reuse. Library projects cannotbe installed
onto a device, however, they are pulled into the .apk fileat
build time.
Android Application Package (APK)
APK is the fileformat used to distributeand install
application softwareand middlewareonto Google’s
Android operatingsystem.
Module 3
Input Controls
are the interactivecomponents in your app's user
interface. Android provides a wide variety of controls you
can use in your UI, such as buttons, text fields,seek bars,
checkboxes, zoom buttons, toggle buttons, and many
more.
Button
A button consists of text or an icon (or both text and
an icon) that communicates what action occurs when the
user touches it.
Three ways to create a button in your layout
1. With text, usingthe Button class
2. With an icon,usingthe ImageButton
class
3. With text and an icon usingButton Class
with some additional attribute
Button Click Events
When the user clicks a button, the Button object
receives an on-click event.
To define the click event handler for a button, add
the android:onClick attribute to the <Button> element in
your XML layout.
Button Style
android:background
attribute for customizingindividual buttons with a
different background with drawable or color resource.
Text Fields
A text field allows theuser to type text into your app.
It can be either singlelineor multi-line.Touchinga text
field places the cursor and automatically displaysthe
keyboard. In addition to typing, text fields allowfor a
variety of other activities,such as textselection (cut, copy,
paste) and data look-up via auto-completion.
You can specify the type of keyboard you want for your
EditText object with the android:inputType attribute.
"text"
Normal text keyboard.
"textEmailAddress"
Normal text keyboard with the @ character.
"textUri"
Normal text keyboard with the / character.
"number"
Basic number keypad.
"phone"
Phone-style keypad.
"textCapSentences"
Normal text keyboard that capitalizes thefirstletter for
each new sentence.
"textCapWords"
Normal text keyboard that capitalizes every word. Good
for titles or person names.
"textAutoCorrect"
Normal text keyboard that corrects commonly
misspelled words.
"textPassword"
Normal text keyboard, but the characters entered
turn into dots.
"textMultiLine"
Normal text keyboard that allowusers to input longstrings
of text that includelinebreaks (carriagereturns).
Providing Auto-complete Suggestions
If you want to provide suggestions to users as they
type, you can use a subclass of EditText called
AutoCompleteTextView.
To implement auto-complete, you must specify an
(@link android.widget.Adapter) that provides the text
suggestions.
Checkboxes
Checkboxes allowthe user to select one or more
options from a set. Typically,you should present each
checkbox option in a vertical list.
To create each checkbox option,create
a CheckBox in your layout.Because a set of checkbox
options allows theuser to select multipleitems, each
checkbox is managed separately and you must register a
click listener for each one.
Radio Buttons
Radio buttons allowthe user to select one option
from a set. You should use radio buttons for optional sets
that are mutually exclusiveif you think that the user needs
to see all availableoptions side-by-side.If it's not
necessary to show all options side-by-side,usea
spinner instead.
Responding to Click Events
To define the click event handler for a checkbox and
radiobutton add the android:onClick attribute to
the <CheckBox> and <RadioButton> element in your XML
layout.Both checkbox and radiobutton follows the
definition of click event handler of a button
Toggle Buttons
A toggle button allows theuser to change a setting
between two states.
You can add a basic toggle button to your layoutwith
the ToggleButton object. Android 4.0 (API level 14)
introduces another kind of toggle button called a switch
that provides a slider control,which you can add with
a Switch object.
The ToggleButton and Switch controls aresubclasses
of CompoundButton and function in the same manner, so
you can implement their behavior the same way.
Spinners
Spinners providea quick way to select one value
from a set. In the default state, a spinner shows its
currently selected value.Touching the spinner displaysa
dropdown menu with all other availablevalues,from
which the user can select a new one.
The createFromResource() method allows you to
create an ArrayAdapter from the stringarray.The third
argument for this method is a layoutresource that defines
how the selected choiceappears in the spinner control.
The simple_spinner_item layoutis provided by the
platformand is the default layoutyou should useunless
you'd liketo define your own layoutfor the spinner's
appearance.
You should then
call setDropDownViewResource(int) to specify the layout
the adapter should useto display thelistof spinner
choices (simple_spinner_dropdown_item is another
standard layoutdefined by the platform).
Call setAdapter() to apply the adapter to
your Spinner.
Pickers
Android provides controls for the user to pick a time
or pick a date as ready-to-use dialogs.Each picker provides
controls for selectingeach partof the time (hour, minute,
AM/PM) or date (month, day, year). Usingthese pickers
helps ensure that your users can pick a time or date that is
valid,formatted correctly,and adjusted to the user's
locale.
DialogFragment
use to host time or date picker, manages the dialog
lifecyclefor you and allows you to display thepickers in
different layoutconfigurations,such asin a basicdialogon
handsets or as an embedded part of the layouton large
screens.
Creating a Time Picker
To display a TimePickerDialog using DialogFragment,
you need to define a fragment classthatextends
DialogFragment and return a TimePickerDialog from the
fragment's onCreateDialog() method.
Extending DialogFragment for a time picker
1. Define the onCreateDialog() method to
return an instanceof TimePickerDialog
2. Implement the
TimePickerDialog.OnTimeSetListener
interface to receive a callback when the
user sets the time.
•
Input Controls arethe interactivecomponents in
your app's user interface.
• A button consists of text or an icon (or both text
and an icon) that communicates what action
occurs when the user touches it.
• Three ways to create a button in your layout
• With text, usingthe Button class
• With an icon,usingthe ImageButton
class
• With text and an icon using Button Class
with some additional attribute
• android:onClick attributecan be use for
eventhandler for common controls
• The method signaturefor android:onClick attribute
must be public,void,and with a parameter View.
Module 4
Screen Size
Actual physical size,measured as the screen's
diagonal.
Screen Density
The quantity of pixels within a physical area of the
screen; usually referred to as dpi (dots per inch).
Orientation
The orientation of the screen from the user's pointof
view. This is either landscapeor portrait,meaningthat the
screen's aspectratio is either wide or tall,respectively.
Resolution
The total number of physical pixelson a screen.
When addingsupportfor multiplescreens, applicationsdo
not work directly with resolution;applications should be
concerned only with screen size and density, as specified
by the generalized sizeand density groups.
Density-independent pixel (dp)
A virtual pixel unitthatyou should usewhen defining
UI layout,to express layoutdimensions or position in a
density-independent way. Based on a 160 dpi screen.
SIZES AND DENSITIES
Android divides the range of actual screen sizes and
densities into:
General Sizes
small,normal,large,and xlarge
General Densities
ldpi (low),mdpi (medium), hdpi (high),and xhdpi
(extra high)
Alternative Drawables
To create alternativebitmap drawables for different
densities,you should followthe 3:4:6:8 scaling
ratio between the four generalized densities.
• 36x36 for low-density
• 48x48 for medium-density
• 72x72 for high-density
• 96x96 for extra high-density
Attributes
Every View and ViewGroup object supports their
own variety of XML attributes. Some attributes are specific
to a View object (for example, TextView supports
the textSize attribute), but these attributes are also
inherited by any View objects that may extend this class.
ID
Any View object may have an integer ID associated
with it, to uniquely identify the View within the tree. When
the application is compiled,this ID is referenced as an
integer, but the ID is typically assigned in the layoutXML
fileas a string,in the id attribute.
Layout Parameters
XML layoutattributes
named layout_something define layoutparameters for the
View that are appropriatefor the ViewGroup in which it
resides.
Every ViewGroup classimplements a nested class
that extends ViewGroup.LayoutParams. This subclass
contains property types that define the sizeand position
for each child view, as appropriatefor the view group.

Weitere ähnliche Inhalte

Was ist angesagt?

Android tutorial
Android tutorialAndroid tutorial
Android tutorialEd Zel
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialkatayoon_bz
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI WidgetsAhsanul Karim
 
Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Ahsanul Karim
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShrijan Tiwari
 
Android application-component
Android application-componentAndroid application-component
Android application-componentLy Haza
 
Android Tutorial
Android TutorialAndroid Tutorial
Android TutorialFun2Do Labs
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in BackgroundAhsanul Karim
 
Android developer interview questions with answers pdf
Android developer interview questions with answers pdfAndroid developer interview questions with answers pdf
Android developer interview questions with answers pdfazlist247
 
Android Development project
Android Development projectAndroid Development project
Android Development projectMinhaj Kazi
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAhsanul Karim
 
Londroid Android Home Screen Widgets
Londroid Android Home Screen WidgetsLondroid Android Home Screen Widgets
Londroid Android Home Screen WidgetsRichard Hyndman
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
 
What’s new in Xcode 8? – Future of Native App Development Opportunities
What’s new in Xcode 8? – Future of Native App Development OpportunitiesWhat’s new in Xcode 8? – Future of Native App Development Opportunities
What’s new in Xcode 8? – Future of Native App Development OpportunitiesRigel Networks LLC
 

Was ist angesagt? (20)

Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 
Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
GUI JAVA PROG ~hmftj
GUI  JAVA PROG ~hmftjGUI  JAVA PROG ~hmftj
GUI JAVA PROG ~hmftj
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in Background
 
Android developer interview questions with answers pdf
Android developer interview questions with answers pdfAndroid developer interview questions with answers pdf
Android developer interview questions with answers pdf
 
Android Development project
Android Development projectAndroid Development project
Android Development project
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
 
Londroid Android Home Screen Widgets
Londroid Android Home Screen WidgetsLondroid Android Home Screen Widgets
Londroid Android Home Screen Widgets
 
Android overview
Android overviewAndroid overview
Android overview
 
Android UI
Android UIAndroid UI
Android UI
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017
 
What’s new in Xcode 8? – Future of Native App Development Opportunities
What’s new in Xcode 8? – Future of Native App Development OpportunitiesWhat’s new in Xcode 8? – Future of Native App Development Opportunities
What’s new in Xcode 8? – Future of Native App Development Opportunities
 

Ähnlich wie Everything You Need to Know About Android

ANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docPalakjaiswal43
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptxallurestore
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Android best training-in-mumbai
Android best training-in-mumbaiAndroid best training-in-mumbai
Android best training-in-mumbaivibrantuser
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfweerabahu
 
Android interview questions and answers
Android interview questions and answersAndroid interview questions and answers
Android interview questions and answerskavinilavuG
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assARVIND SARDAR
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development TutorialGermán Bringas
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android ApplicationArcadian Learning
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 

Ähnlich wie Everything You Need to Know About Android (20)

Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
ANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.doc
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptx
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Android best training-in-mumbai
Android best training-in-mumbaiAndroid best training-in-mumbai
Android best training-in-mumbai
 
Android
Android Android
Android
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
 
Android interview questions and answers
Android interview questions and answersAndroid interview questions and answers
Android interview questions and answers
 
Aptech Apps
Aptech Apps Aptech Apps
Aptech Apps
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-ass
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android Application
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 

Mehr von ndalban

Psychology: Perception
Psychology: PerceptionPsychology: Perception
Psychology: Perceptionndalban
 
Psych: Motivation
Psych: MotivationPsych: Motivation
Psych: Motivationndalban
 
Psychology: Learning
Psychology: LearningPsychology: Learning
Psychology: Learningndalban
 
Psychology: Frustration
Psychology: FrustrationPsychology: Frustration
Psychology: Frustrationndalban
 
Defense Mechanism Reviewer
Defense Mechanism ReviewerDefense Mechanism Reviewer
Defense Mechanism Reviewerndalban
 
Pre-Natal Development
Pre-Natal DevelopmentPre-Natal Development
Pre-Natal Developmentndalban
 
Sensation Reviewer
Sensation ReviewerSensation Reviewer
Sensation Reviewerndalban
 

Mehr von ndalban (7)

Psychology: Perception
Psychology: PerceptionPsychology: Perception
Psychology: Perception
 
Psych: Motivation
Psych: MotivationPsych: Motivation
Psych: Motivation
 
Psychology: Learning
Psychology: LearningPsychology: Learning
Psychology: Learning
 
Psychology: Frustration
Psychology: FrustrationPsychology: Frustration
Psychology: Frustration
 
Defense Mechanism Reviewer
Defense Mechanism ReviewerDefense Mechanism Reviewer
Defense Mechanism Reviewer
 
Pre-Natal Development
Pre-Natal DevelopmentPre-Natal Development
Pre-Natal Development
 
Sensation Reviewer
Sensation ReviewerSensation Reviewer
Sensation Reviewer
 

Kürzlich hochgeladen

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Everything You Need to Know About Android

  • 1. What is Android? • A software platformand operatingsystem for mobile devices • Based on the Linux kernel • Developed by Google and later the Open Handset Alliance (OHA) • Allows writingmanaged code in the Java language • Unveilingof the Android platform was announced on 5 November 2007 with the founding of OHA November 5, 2007 (Android Birth Day) • The Android SDK was firstissued as an “early look” releasein November 2007. • In September 2008 T-Mobile announced the availability of the T-Mobile G1, the firstsmartphone based on the Android Platform. • In October 2008,Google made the source code of the Android Platformavailableunder Apache’s open sourcelicense. • Code name Version number API level (No codename)[2] 1.0 1 (Internally known as "Petit Four")[2] 1.1 2 Cupcake 1.5 3 Donut[3] 1.6 4 Eclair[4] 2.0 – 2.1 5 – 7 Code name Version number API level Froyo[5] 2.2 – 2.2.3 8 Gingerbread[6] 2.3 – 2.3.7 9 – 10 Honeycomb[7] 3.0 – 3.2.6 11 – 13 Ice Cream Sandwich[8] 4.0 – 4.0.4 14 – 15 Jelly Bean[9] 4.1 – 4.3.1 16 – 18 KitKat[10] 4.4 – 4.4.4 19 – 20 Lollipop[12] 5.0 – 5.1.1 21 – 22 Marshmallow[13] 6.0 – 6.0.1 23 Nougat[14] 7.0 – 7.1.2 24 – 25 Oreo[15] 8.0 – 8.1 26 – 27 • • Most of the application framework accesses these core libraries through the Dalvik VM, the gateway to the Android Platform • • • •
  • 2. • Android Application Framework Feature Role View System Used to build an application,includinglists, grids,textboxes, buttons, and embedded web browser Content Provider Enablingapplications to access data fromother applicationsor to sharetheir own data Resourc e Manage r Providingaccess to non-code resources (localized string,graphics,and layoutfiles) Notifica tion Manage r Enablingall applicationsto display customer alerts in the status bar Activity Manage r Managingthe lifecycleof applicationsand providinga common navigation backstack • The media libraries are based on PacketVideo’s (http://www.packetvideo.com/) OpenCORE. These libraries areresponsiblefor recording and playback of audio and video formats. A library called Surface Manager controls access to the display systemand supports 2D and 3D. • The WebKit library isresponsiblefor browser support; it is the same library thatsupports Google Chrome and Apple Inc.’s Safari.The FreeType library isresponsiblefor font support. • SQLite (http://www.sqlite.org/) is a relational databasethat is availableon the device itself. SQLite is also an independent open sourceeffort for relational databases and notdirectly tied to Android. You can acquireand use tools meant for SQLite for Android databases as well. • Dalvik Virtual Machine (DVM) o Providingenvironment on which every Android application runs o Each Android application runs in its own process, with its own instanceof the Dalvik VM. o Dalvik has been written so that a device can run multipleVMs efficiently. o Register-based virtual machine Resumed In this state, the activity is in the foreground and the user can interactwith it. (Also sometimes referred to as the "running" state.) Paused In this state, the activity is partially obscured by another activity—the other activity that's in the foreground is semi-transparentor doesn't cover the entire screen. The paused activity does not receive user input and cannot execute any code. Stopped In this state, the activity is completely hidden and not visibleto the user; it is considered to be in the background.Whilestopped, the activity instanceand all its state information such as member variables isretained, but itcannot execute any code. The other states (Created and Started) aretransientand the system quickly moves from them to the next state by callingthe next lifecyclecallback method. That is,after the system calls onCreate(),itquickly calls onStart(),which is quickly followed by onResume(). Defining Main Activity You can define which activity to use as the main activity in the Android manifestfile, AndroidManifest.xml, which is atthe root of your projectdirectory. The main activity for your app must be declared in the manifest with an <intent-filter> that includes the MAIN action and LAUNCHER category. Module 2 Android SDK The Android SDK provides you the API libraries and developer tools necessary to build,test, and debug apps for Android
  • 3. Android Directory Structure Managing Projects Projects actas containers for storingthings such as code and resourcefiles.The SDK tools expect your projects to followa specific structureso itcan compileand package your application correctly,so itis highly recommended that you create them with Eclipseand ADT or with theandroid tool on the command line. 3 types of project 1. Android Projects 2. Test Projects 3. Library Projects Android Projects An Android project is the container for your application'ssourcecode,resource files,and files such as the Ant build and Android Manifest file.An application project is the main type of project and the contents are eventually builtinto an .apk filethat you install on a device. Test Projects These projects contain code to test your application projects and arebuiltinto applications thatrun on a device. Library Projects These projects contain shareableAndroid source code and resources that you can reference in Android projects.This is useful when you have common code that you want to reuse. Library projects cannotbe installed onto a device, however, they are pulled into the .apk fileat build time. Android Application Package (APK) APK is the fileformat used to distributeand install application softwareand middlewareonto Google’s Android operatingsystem. Module 3 Input Controls are the interactivecomponents in your app's user interface. Android provides a wide variety of controls you can use in your UI, such as buttons, text fields,seek bars, checkboxes, zoom buttons, toggle buttons, and many more. Button A button consists of text or an icon (or both text and an icon) that communicates what action occurs when the user touches it. Three ways to create a button in your layout 1. With text, usingthe Button class 2. With an icon,usingthe ImageButton class 3. With text and an icon usingButton Class with some additional attribute
  • 4. Button Click Events When the user clicks a button, the Button object receives an on-click event. To define the click event handler for a button, add the android:onClick attribute to the <Button> element in your XML layout. Button Style android:background attribute for customizingindividual buttons with a different background with drawable or color resource. Text Fields A text field allows theuser to type text into your app. It can be either singlelineor multi-line.Touchinga text field places the cursor and automatically displaysthe keyboard. In addition to typing, text fields allowfor a variety of other activities,such as textselection (cut, copy, paste) and data look-up via auto-completion. You can specify the type of keyboard you want for your EditText object with the android:inputType attribute. "text" Normal text keyboard. "textEmailAddress" Normal text keyboard with the @ character. "textUri" Normal text keyboard with the / character. "number" Basic number keypad. "phone" Phone-style keypad. "textCapSentences" Normal text keyboard that capitalizes thefirstletter for each new sentence. "textCapWords" Normal text keyboard that capitalizes every word. Good for titles or person names. "textAutoCorrect" Normal text keyboard that corrects commonly misspelled words. "textPassword" Normal text keyboard, but the characters entered turn into dots. "textMultiLine" Normal text keyboard that allowusers to input longstrings of text that includelinebreaks (carriagereturns). Providing Auto-complete Suggestions If you want to provide suggestions to users as they type, you can use a subclass of EditText called AutoCompleteTextView. To implement auto-complete, you must specify an (@link android.widget.Adapter) that provides the text suggestions. Checkboxes Checkboxes allowthe user to select one or more options from a set. Typically,you should present each checkbox option in a vertical list. To create each checkbox option,create a CheckBox in your layout.Because a set of checkbox options allows theuser to select multipleitems, each checkbox is managed separately and you must register a click listener for each one. Radio Buttons Radio buttons allowthe user to select one option from a set. You should use radio buttons for optional sets that are mutually exclusiveif you think that the user needs to see all availableoptions side-by-side.If it's not necessary to show all options side-by-side,usea spinner instead. Responding to Click Events
  • 5. To define the click event handler for a checkbox and radiobutton add the android:onClick attribute to the <CheckBox> and <RadioButton> element in your XML layout.Both checkbox and radiobutton follows the definition of click event handler of a button Toggle Buttons A toggle button allows theuser to change a setting between two states. You can add a basic toggle button to your layoutwith the ToggleButton object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that provides a slider control,which you can add with a Switch object. The ToggleButton and Switch controls aresubclasses of CompoundButton and function in the same manner, so you can implement their behavior the same way. Spinners Spinners providea quick way to select one value from a set. In the default state, a spinner shows its currently selected value.Touching the spinner displaysa dropdown menu with all other availablevalues,from which the user can select a new one. The createFromResource() method allows you to create an ArrayAdapter from the stringarray.The third argument for this method is a layoutresource that defines how the selected choiceappears in the spinner control. The simple_spinner_item layoutis provided by the platformand is the default layoutyou should useunless you'd liketo define your own layoutfor the spinner's appearance. You should then call setDropDownViewResource(int) to specify the layout the adapter should useto display thelistof spinner choices (simple_spinner_dropdown_item is another standard layoutdefined by the platform). Call setAdapter() to apply the adapter to your Spinner. Pickers Android provides controls for the user to pick a time or pick a date as ready-to-use dialogs.Each picker provides controls for selectingeach partof the time (hour, minute, AM/PM) or date (month, day, year). Usingthese pickers helps ensure that your users can pick a time or date that is valid,formatted correctly,and adjusted to the user's locale. DialogFragment use to host time or date picker, manages the dialog lifecyclefor you and allows you to display thepickers in
  • 6. different layoutconfigurations,such asin a basicdialogon handsets or as an embedded part of the layouton large screens. Creating a Time Picker To display a TimePickerDialog using DialogFragment, you need to define a fragment classthatextends DialogFragment and return a TimePickerDialog from the fragment's onCreateDialog() method. Extending DialogFragment for a time picker 1. Define the onCreateDialog() method to return an instanceof TimePickerDialog 2. Implement the TimePickerDialog.OnTimeSetListener interface to receive a callback when the user sets the time. • Input Controls arethe interactivecomponents in your app's user interface. • A button consists of text or an icon (or both text and an icon) that communicates what action occurs when the user touches it. • Three ways to create a button in your layout • With text, usingthe Button class • With an icon,usingthe ImageButton class • With text and an icon using Button Class with some additional attribute • android:onClick attributecan be use for eventhandler for common controls • The method signaturefor android:onClick attribute must be public,void,and with a parameter View. Module 4 Screen Size Actual physical size,measured as the screen's diagonal. Screen Density The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). Orientation The orientation of the screen from the user's pointof view. This is either landscapeor portrait,meaningthat the screen's aspectratio is either wide or tall,respectively. Resolution The total number of physical pixelson a screen. When addingsupportfor multiplescreens, applicationsdo not work directly with resolution;applications should be concerned only with screen size and density, as specified by the generalized sizeand density groups. Density-independent pixel (dp) A virtual pixel unitthatyou should usewhen defining UI layout,to express layoutdimensions or position in a density-independent way. Based on a 160 dpi screen. SIZES AND DENSITIES Android divides the range of actual screen sizes and densities into: General Sizes small,normal,large,and xlarge General Densities ldpi (low),mdpi (medium), hdpi (high),and xhdpi (extra high) Alternative Drawables To create alternativebitmap drawables for different densities,you should followthe 3:4:6:8 scaling ratio between the four generalized densities. • 36x36 for low-density • 48x48 for medium-density • 72x72 for high-density • 96x96 for extra high-density
  • 7. Attributes Every View and ViewGroup object supports their own variety of XML attributes. Some attributes are specific to a View object (for example, TextView supports the textSize attribute), but these attributes are also inherited by any View objects that may extend this class. ID Any View object may have an integer ID associated with it, to uniquely identify the View within the tree. When the application is compiled,this ID is referenced as an integer, but the ID is typically assigned in the layoutXML fileas a string,in the id attribute. Layout Parameters XML layoutattributes named layout_something define layoutparameters for the View that are appropriatefor the ViewGroup in which it resides. Every ViewGroup classimplements a nested class that extends ViewGroup.LayoutParams. This subclass contains property types that define the sizeand position for each child view, as appropriatefor the view group.