SlideShare ist ein Scribd-Unternehmen logo
1 von 83
Downloaden Sie, um offline zu lesen
ANDROIDBeginners Workshop
Nitin R Patel
Purvik N Rana
Outline
 Era of Mobile OS
 Android
• What it is..!
• Software stack
• Components
• App fundamentals
 Development Environments
• Tools/Setups
 Application Structure
 Layouts and View
 Activity
 Fragments
 Services
ERA OF MOBILE OS
 Symbian
• low-end phones
 Android
• Sep 20th, 2008 (Astro)
 Apple iOS
• June 29th, 2007
 BlackBerry
• property of Research in Motion (RIM) found in1999
 Windows
• Started by Nokia to take his reputation back to forth
 BADA
• owns by Samsung
ANDROID OS
What it is..!!
 Free – open source OS (platform for app creation)
 Linux kernel based OS
 Developed by Google and later the Open Handset Alliance (OHA)
 Allow to write/manage code in the Java
 Core and third party app are equal
 Easy and fast app development
 Era of Android starts since 5 November 2007
OHA
 Open Handset Alliance
 Group of technology and mobile companies
 First free provided mobile platform is – Android
 Providing richer experience (with open standards)  main Goal
 Handset manufactures are free to pay licencing fees to load
Android
Version History
Version Codename API Distribution
4.0.3 -
4.0.4
Ice Cream
Sandwich
15 3.7%
4.2.x
Jelly Bean
17 15.2%
4.3 18 4.5%
4.4 KitKat 19 39.2%
5.0
Lollipop
21 15.9%
5.1 22 5.1%
Native Android Applications
 Home Screen
 Music Player, Picture Gallery
 SMS, E-mail
 Camera Apps
 Full PIM (Calendar, Contacts)
 Web Browsers
 Play Store
 Sensors
 Google Maps
 Google Talk
 Google Mail Client
 YouTube
 Data Stores
 Much more . . .
Android Software Stack
• Contain all the Low level drivers for various hardware components of
Android
• Relaying on Linux Kernel for core system services like
• Memory and process management
• Network stack
• Driver model
• Security
• Provide Abstraction between hardware and rest of the software stack
Linux Kernel
• Set of Core libraries – enable developers to write Android Apps using
Java Programming
• DVM – Dalvik Virtual Machine
Android Runtime
Dalvik Virtual Machine
 Provides environment to let us execute Android application
 Each Android application runs in its own process
• Have it’s own instance of the Dalvik VM
 Dalvik has been written such that a device can run multiple VMs
efficiently.
 Register-based virtual machine
• Executing the Dalvik Executable (.dex) format
• .dex format is optimized for minimal memory footprint.
 Compilation
• Relying on the Linux Kernel for: Threading & other Low-level
memory management
 Exposed to developers through the Android application framework
 Including a set of C/C++ libraries used by components of the Android system
 Code for main features
• SQLite library- data storage
• WebKit library – functions for web browsing and much more..
Libraries
 Expose various capabilities of Android – developers use them in their
Apps
 Enabling and simplifying the reuse of components
• Developers have full access to the same framework APIs used by
the core applications
• Users are allowed to replace components
Application Framework
 Features
 Apps that download and install from Android Market
 Android provides a set of core applications:
• Email Client
• SMS Program
• Calendar
• Maps
• Browser
• Contacts etc…
Applications
Android Components
 Activities
• Single UI that handle the user interaction, app contains one or more activities
 Services
• handle background processing for applications, doesn‟t have UI
 Broadcast Receivers
• handle communication between Android OS and applications
 Content Providers
• handle data and database management issues
 Views
• UI elements like Buttons, Textviews and many more…
Android Application Fundamental
 Individual app lives in its own world
• Each application has its own process
• Identify with unique Linux user ID
• File alteration only permitted – ID and apps (through permission)
 Applications in between can – process elements of each other
DEVELOPMENT ENVIRONMENT
Eclipse – Android Studio
System requirements
 OS
• Xp (32) , Vista (32 - 64), 7 (32 - 64)
• Mac OS (10.5.8 or later)
• Linux
 Eclipse IDE (3.6.2 or later)
 Android SDK
 ADT Plug In
 JDK 6 (or later)
Continue . .
 Remember to get download of right version of java
 Unpack ZIP of SDK at appropriate location
 Install additional version of Android as well as other packages
 Configure Android Development Environment on Eclipse
• Add New Software to Eclipse
• ADT Plug In configuration
ADT integration in Eclipse
SDK Manager
Android Virtual Device
DDMS Perspective
Debug..
Android Studio
Studio interface
First Hello World Example (Demo)
ANDROID APPLICATION STRUCTURE
 Codes & Resources resides in Different Folders
 Can be added as needed
• src : all source codes
• gen : java files generated by ADT
• assets : store raw assests files
• bin : output directory
• res : resources of our application
• res/drawable : image/image-descriptor files
• res/layouts : layouts of application
• res/menus : application menus
• res/values : other resources of application like
• Strings, Styles, Colors and so on… (xml based)
Studio file structure
 Benefits
• Good to keep code away from all other things
• Easy to maintain – update – manage
• Support different devices and localization
• Resource selection dynamically at runtime
 System resources defined under System.R
Strings.xml
Colors.xml
 Efficient to group all colors in one separate file like strings the
same way…
Androidmenifest.xml
 Application descriptor file
 Properties like..
• Activities
• Content Providers
• Services
• Intent Receivers
• Permissions
• Version Number
• And much more . . .
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.svit.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="21" />
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity" android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Different language and hardware
 Dynamic resource collection mechanism
• Done with dynamic directory structure
• Specific language, location, hardware
• Alternatives described with – mark
 Like.
• res/layout/main.xml
• res/layout-land/main.xml
• res/values-fi/strings.xml
• res/values-en/strings/xml
Screen orientation support
 Portrait and Landscape mode can be done easily by resources
• Portrait – automatically
• Landscape – specified in layout-land
• Phone switches layout automatically by when orientation changes
BREAK
LAYOUTS AND VIEWS
 Android Application UI is built using Views and Viewgroups
 Different “Widgets” like Button, Textview, which are the UI
objects are the subclass of the class “View”
 “Layouts‟‟ are the subclass of Viewgroup
 Different types of Layouts are available in this class
 Various Layouts
• Arrange the views in Single Row or Single Column
Linear Layout
• Group views into rows and column
• <TableRow> - design a Row in the Table
Table Layout
• Enables you to set child position relative to each other
Relative Layout
• A blank space on the screen which can later be filled with a
single object
Frame Layout
Defining Layouts with xml
 Most common way is to use XML for declaring Layout
 Each element of XML is ether a View or a Viewgroup
 The Name of the XML element is like the java class that
represents like <TextView> element creates a Textview in the UI
 Android attach the view hierarchy tree to the screen
 Activity call the setContentView() method and pass the reference
to the root node object
 Then draw() method of the view is called to draw the widget on
screen
 Linear Layout Example
 Relative Layout Example
 Relative Layout Example
 Relative Layout Example
 Relative Layout Example
Common Input controls
 Input controls are the interactive components of
the application‟s User Interface
 Android provides wide variety of controls like
Buttons, Text fields, seekbars, checkboxes,
spinners, pickers and so on….
 Use drag and drop the controls from palette to
set controls to layout or edit in XML file
directory
Handling UI Events
 Many ways to intercept the events from a user‟s interaction
depends on the SDK version
 The approach is to capture the events from the specific view
object that the user interacts with
 Use different EventListeners with code or in XML
• onClick, onLongClick, onFocusChange, …….
Handling UI Events
ACTIVITY
basic
 App Component (UI) – user interact to do something
 One app – multiple activities
• Main activity – launch time presented activity
• Other – specified to particular tasks
 Each activity can start another activity
 Subclass of Activity class
 callBack methods – system calls different states of app activity
 Activities are set in the stacks – root activity (begin the Task of
Application)
 Three main states: running, paused, stopped
• Pasued/stoppped : system can drop it from
memory
• UI, data sources and EventHandlers are
bind in onCreate()
• After onResume() : activity visible to user
• onPause() : save critical data at app data
store
 android:name - specify class name of the Activity
 Other attributes – specify additional information (label, icon,
theme..)
 Intent filter – make your activity available to system or other
applications
INTENTS
basics
 Most important and unique concepts
 Like „message‟to someone
 Can be used to
• Broadcast/Transfer data between application and app components
• Start Activities and Services
• Broadcast that event/action has occurred
 Intent Object  like bundle of information
 Contains
• Component : explicit name of component class to use for intent
• Action : action to be perform
• Data : URI of data to be acted on
• Category : string that indicate kind of a component that should handle
the intent
• Type : indicate Type of intent data
• Extras : key-value pairs of information
• Flags : instruct how to launch activity and how to treat it
Intent object actions
Intent object data
 ACTION_VIEW content://contacts/people/1
 ACTOIN_DIAL content://contacts/people/1
 ACTION_VIEW tel:123
 ACTION_DIAL tel:123
 ACTION_EDIT content://contacts/people/1
Intent object category
 Any no of category can be included for intent to categorized
Intent object extras
 Bundle of additional information
 Provide extended information to the component
Intent resolution
 Two groups
• Explicit : used for application-internal messages(b/w activities)
• Delivered to an instance of designated target class
• startActivity(intent)
• Starts new Activity (Data can be passed with intent)
• Parent does not notify when child activity completes
• startActivityForResult(intent, REQUEST_CODE)
• same but parent get notify when child activity completes by OnActivityCompletes()
• Implicit : used to activate components in other applications
• Resolved by intent filters by object‟s (Action – Data - Category)
• System must find best component to handle intent
Intent filter
 Explicit – always deliver to target class
 Activities, Services and Broadcast receivers can have one or more
intent filters
 Filter describes the capability of a component
 Defined in the manifest file
Passing data between activities
 Intent can have addtional data  extras
 Key/value pair
 Send data:
• intent.putExtra(“info”,value);
 Get data:
• Bundle extra = getIntent().getExtras();
• int var = extra.getInt(“info”);
Receiving result from an activity
 Custom Intents
• Customize name in the manifest to receive intent
 Broadcast Intents
• No activity needed
• Listen broadcast intents
• Register in manifest file as Receiver
• Intent-filter used to match with listened intent actions
Custom intent
Broadcast intents
FRAGMENTS
Fragment Basics
 Fragment represents a behaviour or a portion of user interface in
an Activity
 To build a multi-Pane UI, multiple fragments are combined in a
single activity
 Fragment must be embedded in an activity
 Fragment has its own lifecycle
 It supports more dynamic and flexible UI designs on large screens
 Example of Typical fragment:
• For Tablet: - list in left & content on right
• For Handset: - List & content on different Activity
SERVICES
basic
 Components runs in background (without UI)
 not a separate process or thread
 Can be stand alone process or part of an application
 Started, stopped, controlled by other application cpmponents
 Started services have higher priority than inactive or invisible activities
 Supports
• local services (not accessible outside of application)
• remote services (accessible outside of application)
Service creation
 Create class that extends Service class
 Override needed methods
• onCreate() : Launched on main application thread
• onStartCommand(Intent, int, int) : Create and run new thread
• onBind() : bind Activities to Service
• onDestroy() : do all clean up (stop threads,..)
Service lifcycle
 Context.startService()
• onCreate() : create a Service
• onStart() : start it
• onStartCommand()
• Context.stopService()/stopSelf() : Stops it
 Client.bindService()
• Create if it is not already running
• Doesn‟t call onStartCommand()
• onBind() : client will receive Ibinder object from
Service itself
• Remain running as long as connection is established
• Allows client to call back to Service
Day 1 ends here

Weitere ähnliche Inhalte

Was ist angesagt?

Android architecture
Android architectureAndroid architecture
Android architecturepoojapainter
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidsrinivasansoundar
 
Android Presentation
Android PresentationAndroid Presentation
Android PresentationBram Vandeputte
 
Android architecture
Android architectureAndroid architecture
Android architectureSaurabh Kukreja
 
Android software stack
Android software stackAndroid software stack
Android software stackSoba Arjun
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplicationpoojapainter
 
Android the new Mobile Technoogy
Android the new Mobile TechnoogyAndroid the new Mobile Technoogy
Android the new Mobile Technoogypoojapainter
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architectureDilip Singh
 
Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System ArchitectureDINESH KUMAR ARIVARASAN
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidkrishnastudent88
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 

Was ist angesagt? (20)

Android workshop
Android workshopAndroid workshop
Android workshop
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android Presentation
Android PresentationAndroid Presentation
Android Presentation
 
Android primer
Android primerAndroid primer
Android primer
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android software stack
Android software stackAndroid software stack
Android software stack
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplication
 
Android the new Mobile Technoogy
Android the new Mobile TechnoogyAndroid the new Mobile Technoogy
Android the new Mobile Technoogy
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android Seminar
Android SeminarAndroid Seminar
Android Seminar
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 
Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System Architecture
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
android
androidandroid
android
 
Andriod
Andriod Andriod
Andriod
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 

Ähnlich wie Android Workshop_1

Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)Chien-Ming Chou
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
Android architecture
Android architectureAndroid architecture
Android architectureDeepa Rahul
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Mohammed Adam
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Android Technology
Android TechnologyAndroid Technology
Android TechnologyAnshul Sharma
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)Omolara Adejuwon
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxdebasish duarah
 
Learn Android at edureka!
Learn Android at edureka! Learn Android at edureka!
Learn Android at edureka! Edureka!
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep DiveMarko Gargenta
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 
Android
Android Android
Android Edureka!
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 

Ähnlich wie Android Workshop_1 (20)

Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptx
 
Learn Android at edureka!
Learn Android at edureka! Learn Android at edureka!
Learn Android at edureka!
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Android
Android Android
Android
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 

Mehr von Purvik Rana

Software Quality Assurance - Software Engineering
Software Quality Assurance - Software EngineeringSoftware Quality Assurance - Software Engineering
Software Quality Assurance - Software EngineeringPurvik Rana
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software EngineeringPurvik Rana
 
Agile Methodology - Software Engineering
Agile Methodology - Software EngineeringAgile Methodology - Software Engineering
Agile Methodology - Software EngineeringPurvik Rana
 
Software Engineering - Basics
Software Engineering - BasicsSoftware Engineering - Basics
Software Engineering - BasicsPurvik Rana
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingPurvik Rana
 
Sql queries - Basics
Sql queries - BasicsSql queries - Basics
Sql queries - BasicsPurvik Rana
 
Apple bonjour
Apple bonjourApple bonjour
Apple bonjourPurvik Rana
 
File system in iOS
File system in iOSFile system in iOS
File system in iOSPurvik Rana
 

Mehr von Purvik Rana (8)

Software Quality Assurance - Software Engineering
Software Quality Assurance - Software EngineeringSoftware Quality Assurance - Software Engineering
Software Quality Assurance - Software Engineering
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
 
Agile Methodology - Software Engineering
Agile Methodology - Software EngineeringAgile Methodology - Software Engineering
Agile Methodology - Software Engineering
 
Software Engineering - Basics
Software Engineering - BasicsSoftware Engineering - Basics
Software Engineering - Basics
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
Sql queries - Basics
Sql queries - BasicsSql queries - Basics
Sql queries - Basics
 
Apple bonjour
Apple bonjourApple bonjour
Apple bonjour
 
File system in iOS
File system in iOSFile system in iOS
File system in iOS
 

KĂźrzlich hochgeladen

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A BeĂąa
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A BeĂąa
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

KĂźrzlich hochgeladen (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPSÂŽ Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

Android Workshop_1

  • 1. ANDROIDBeginners Workshop Nitin R Patel Purvik N Rana
  • 2. Outline  Era of Mobile OS  Android • What it is..! • Software stack • Components • App fundamentals  Development Environments • Tools/Setups  Application Structure  Layouts and View  Activity  Fragments  Services
  • 4.  Symbian • low-end phones  Android • Sep 20th, 2008 (Astro)  Apple iOS • June 29th, 2007  BlackBerry • property of Research in Motion (RIM) found in1999  Windows • Started by Nokia to take his reputation back to forth  BADA • owns by Samsung
  • 6. What it is..!!  Free – open source OS (platform for app creation)  Linux kernel based OS  Developed by Google and later the Open Handset Alliance (OHA)  Allow to write/manage code in the Java  Core and third party app are equal  Easy and fast app development  Era of Android starts since 5 November 2007
  • 7. OHA  Open Handset Alliance  Group of technology and mobile companies  First free provided mobile platform is – Android  Providing richer experience (with open standards)  main Goal  Handset manufactures are free to pay licencing fees to load Android
  • 9. Version Codename API Distribution 4.0.3 - 4.0.4 Ice Cream Sandwich 15 3.7% 4.2.x Jelly Bean 17 15.2% 4.3 18 4.5% 4.4 KitKat 19 39.2% 5.0 Lollipop 21 15.9% 5.1 22 5.1%
  • 10. Native Android Applications  Home Screen  Music Player, Picture Gallery  SMS, E-mail  Camera Apps  Full PIM (Calendar, Contacts)  Web Browsers  Play Store  Sensors  Google Maps  Google Talk  Google Mail Client  YouTube  Data Stores  Much more . . .
  • 12. • Contain all the Low level drivers for various hardware components of Android • Relaying on Linux Kernel for core system services like • Memory and process management • Network stack • Driver model • Security • Provide Abstraction between hardware and rest of the software stack Linux Kernel
  • 13. • Set of Core libraries – enable developers to write Android Apps using Java Programming • DVM – Dalvik Virtual Machine Android Runtime
  • 14. Dalvik Virtual Machine  Provides environment to let us execute Android application  Each Android application runs in its own process • Have it’s own instance of the Dalvik VM  Dalvik has been written such that a device can run multiple VMs efficiently.  Register-based virtual machine • Executing the Dalvik Executable (.dex) format • .dex format is optimized for minimal memory footprint.  Compilation • Relying on the Linux Kernel for: Threading & other Low-level memory management
  • 15.  Exposed to developers through the Android application framework  Including a set of C/C++ libraries used by components of the Android system  Code for main features • SQLite library- data storage • WebKit library – functions for web browsing and much more.. Libraries
  • 16.  Expose various capabilities of Android – developers use them in their Apps  Enabling and simplifying the reuse of components • Developers have full access to the same framework APIs used by the core applications • Users are allowed to replace components Application Framework
  • 18.  Apps that download and install from Android Market  Android provides a set of core applications: • Email Client • SMS Program • Calendar • Maps • Browser • Contacts etc… Applications
  • 19. Android Components  Activities • Single UI that handle the user interaction, app contains one or more activities  Services • handle background processing for applications, doesn‟t have UI  Broadcast Receivers • handle communication between Android OS and applications  Content Providers • handle data and database management issues  Views • UI elements like Buttons, Textviews and many more…
  • 20. Android Application Fundamental  Individual app lives in its own world • Each application has its own process • Identify with unique Linux user ID • File alteration only permitted – ID and apps (through permission)  Applications in between can – process elements of each other
  • 22. System requirements  OS • Xp (32) , Vista (32 - 64), 7 (32 - 64) • Mac OS (10.5.8 or later) • Linux  Eclipse IDE (3.6.2 or later)  Android SDK  ADT Plug In  JDK 6 (or later)
  • 23. Continue . .  Remember to get download of right version of java  Unpack ZIP of SDK at appropriate location  Install additional version of Android as well as other packages  Configure Android Development Environment on Eclipse • Add New Software to Eclipse • ADT Plug In configuration
  • 25.
  • 32. First Hello World Example (Demo)
  • 34.  Codes & Resources resides in Different Folders  Can be added as needed • src : all source codes • gen : java files generated by ADT • assets : store raw assests files • bin : output directory • res : resources of our application • res/drawable : image/image-descriptor files • res/layouts : layouts of application • res/menus : application menus • res/values : other resources of application like • Strings, Styles, Colors and so on… (xml based)
  • 36.  Benefits • Good to keep code away from all other things • Easy to maintain – update – manage • Support different devices and localization • Resource selection dynamically at runtime  System resources defined under System.R
  • 38. Colors.xml  Efficient to group all colors in one separate file like strings the same way…
  • 39. Androidmenifest.xml  Application descriptor file  Properties like.. • Activities • Content Providers • Services • Intent Receivers • Permissions • Version Number • And much more . . . <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.svit.helloworld" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="21" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 40. Different language and hardware  Dynamic resource collection mechanism • Done with dynamic directory structure • Specific language, location, hardware • Alternatives described with – mark  Like. • res/layout/main.xml • res/layout-land/main.xml • res/values-fi/strings.xml • res/values-en/strings/xml
  • 41. Screen orientation support  Portrait and Landscape mode can be done easily by resources • Portrait – automatically • Landscape – specified in layout-land • Phone switches layout automatically by when orientation changes
  • 42. BREAK
  • 44.  Android Application UI is built using Views and Viewgroups  Different “Widgets” like Button, Textview, which are the UI objects are the subclass of the class “View”  “Layouts‟‟ are the subclass of Viewgroup  Different types of Layouts are available in this class
  • 45.  Various Layouts • Arrange the views in Single Row or Single Column Linear Layout • Group views into rows and column • <TableRow> - design a Row in the Table Table Layout • Enables you to set child position relative to each other Relative Layout • A blank space on the screen which can later be filled with a single object Frame Layout
  • 46. Defining Layouts with xml  Most common way is to use XML for declaring Layout  Each element of XML is ether a View or a Viewgroup  The Name of the XML element is like the java class that represents like <TextView> element creates a Textview in the UI  Android attach the view hierarchy tree to the screen  Activity call the setContentView() method and pass the reference to the root node object  Then draw() method of the view is called to draw the widget on screen
  • 52. Common Input controls  Input controls are the interactive components of the application‟s User Interface  Android provides wide variety of controls like Buttons, Text fields, seekbars, checkboxes, spinners, pickers and so on….  Use drag and drop the controls from palette to set controls to layout or edit in XML file directory
  • 53. Handling UI Events  Many ways to intercept the events from a user‟s interaction depends on the SDK version  The approach is to capture the events from the specific view object that the user interacts with  Use different EventListeners with code or in XML • onClick, onLongClick, onFocusChange, …….
  • 56. basic  App Component (UI) – user interact to do something  One app – multiple activities • Main activity – launch time presented activity • Other – specified to particular tasks  Each activity can start another activity  Subclass of Activity class  callBack methods – system calls different states of app activity  Activities are set in the stacks – root activity (begin the Task of Application)
  • 57.  Three main states: running, paused, stopped • Pasued/stoppped : system can drop it from memory • UI, data sources and EventHandlers are bind in onCreate() • After onResume() : activity visible to user • onPause() : save critical data at app data store
  • 58.  android:name - specify class name of the Activity  Other attributes – specify additional information (label, icon, theme..)  Intent filter – make your activity available to system or other applications
  • 60. basics  Most important and unique concepts  Like „message‟to someone  Can be used to • Broadcast/Transfer data between application and app components • Start Activities and Services • Broadcast that event/action has occurred
  • 61.  Intent Object  like bundle of information  Contains • Component : explicit name of component class to use for intent • Action : action to be perform • Data : URI of data to be acted on • Category : string that indicate kind of a component that should handle the intent • Type : indicate Type of intent data • Extras : key-value pairs of information • Flags : instruct how to launch activity and how to treat it
  • 63. Intent object data  ACTION_VIEW content://contacts/people/1  ACTOIN_DIAL content://contacts/people/1  ACTION_VIEW tel:123  ACTION_DIAL tel:123  ACTION_EDIT content://contacts/people/1
  • 64. Intent object category  Any no of category can be included for intent to categorized
  • 65. Intent object extras  Bundle of additional information  Provide extended information to the component
  • 66. Intent resolution  Two groups • Explicit : used for application-internal messages(b/w activities) • Delivered to an instance of designated target class • startActivity(intent) • Starts new Activity (Data can be passed with intent) • Parent does not notify when child activity completes • startActivityForResult(intent, REQUEST_CODE) • same but parent get notify when child activity completes by OnActivityCompletes() • Implicit : used to activate components in other applications • Resolved by intent filters by object‟s (Action – Data - Category) • System must find best component to handle intent
  • 67. Intent filter  Explicit – always deliver to target class  Activities, Services and Broadcast receivers can have one or more intent filters  Filter describes the capability of a component  Defined in the manifest file
  • 68. Passing data between activities  Intent can have addtional data  extras  Key/value pair  Send data: • intent.putExtra(“info”,value);  Get data: • Bundle extra = getIntent().getExtras(); • int var = extra.getInt(“info”);
  • 69. Receiving result from an activity
  • 70.  Custom Intents • Customize name in the manifest to receive intent  Broadcast Intents • No activity needed • Listen broadcast intents • Register in manifest file as Receiver • Intent-filter used to match with listened intent actions
  • 74. Fragment Basics  Fragment represents a behaviour or a portion of user interface in an Activity  To build a multi-Pane UI, multiple fragments are combined in a single activity  Fragment must be embedded in an activity  Fragment has its own lifecycle  It supports more dynamic and flexible UI designs on large screens
  • 75.  Example of Typical fragment: • For Tablet: - list in left & content on right • For Handset: - List & content on different Activity
  • 77. basic  Components runs in background (without UI)  not a separate process or thread  Can be stand alone process or part of an application  Started, stopped, controlled by other application cpmponents  Started services have higher priority than inactive or invisible activities  Supports • local services (not accessible outside of application) • remote services (accessible outside of application)
  • 78. Service creation  Create class that extends Service class  Override needed methods • onCreate() : Launched on main application thread • onStartCommand(Intent, int, int) : Create and run new thread • onBind() : bind Activities to Service • onDestroy() : do all clean up (stop threads,..)
  • 79. Service lifcycle  Context.startService() • onCreate() : create a Service • onStart() : start it • onStartCommand() • Context.stopService()/stopSelf() : Stops it  Client.bindService() • Create if it is not already running • Doesn‟t call onStartCommand() • onBind() : client will receive Ibinder object from Service itself • Remain running as long as connection is established • Allows client to call back to Service
  • 80.
  • 81.
  • 82.
  • 83. Day 1 ends here