SlideShare a Scribd company logo
Android
References
 This tutorial is a brief overview of some
major concepts…Android is much richer
and more complex
 Developer’s Guide
 http://developer.android.com/guide/index.html
 API Reference
 http://developer.android.com/reference/packages.html
Tools
 Phone
 Eclipse ( http://www.eclipse.org/downloads/ )
 Android Plugin (ADT)
 Android SDK
( http://developer.android.com/sdk/index.html )
 Install everything except Additional SDK
Platforms, unless you want to
 Windows Users: may need to install
Motorola Driver directly
( http://www.motorola.com/Support/US-EN/Support-
Homepage/Software_and_Drivers/USB-and-PC-Charging-
Drivers )
Android SDK
 Once installed open the SDK Manager
 Install the desired packages
 Create an Android Virtual Device
(AVD)
SDK Manager
AVD
ADT Plugin
 In Eclipse, go to Help -> Install New Software
 Click ‘Add’ in top right
 Enter:
 Name: ADT Plugin
 Location: https://dl-ssl.google.com/android/eclipse/
 Click OK, then select ‘Developer Tools’, click
Next
 Click Next and then Finish
 Afterwards, restart Eclipse
 Specify SDK location (next 3 slides)
 Must do this every time start a new project in a new
location (at least in Windows)
ADT Plugin
ADT Plugin
ADT Plugin
Creating a Project
Creating a Project
Need
the
items
circled
Then
click
Finish
Project Components
 src – your source code
 gen – auto-generated code (usually just
R.java)
 Included libraries
 Resources
 Drawables (like .png images)
 Layouts
 Values (like strings)
 Manifest file
XML
 Used to define some of the resources
 Layouts (UI)
 Strings
 Manifest file
 Shouldn’t usually have to edit it directly,
Eclipse can do that for you
 Preferred way of creating UIs
 Separates the description of the layout from
any actual code that controls it
 Can easily take a UI from one platform to
another
R Class
 Auto-generated: you shouldn’t edit it
 Contains IDs of the project resources
 Enforces good software engineering
 Use findViewById and Resources object to
get access to the resources
 Ex. Button b =
(Button)findViewById(R.id.button1)
 Ex. getResources().getString(R.string.hello));
Layouts
 Eclipse has a great UI creator
 Generates the XML for you
 Composed of View objects
 Can be specified for portrait and
landscape mode
 Use same file name, so can make completely
different UIs for the orientations without
modifying any code
Layouts
Layouts
 Click ‘Create’ to make layout modifications
 When in portrait mode can select ‘Portrait’ to
make a res sub folder for portrait layouts
 Likewise for Landscape layouts while in landscape
mode
 Will create folders titled ‘layout-port’ and ‘layout-land’
 Note: these ‘port’ and ‘land’ folders are examples
of ‘alternate layouts’, see here for more info
 http://developer.android.com/guide/topics/resources/providing-resources.html
 Avoid errors by making sure components have
the same id in both orientations, and that you’ve
tested each orientation thoroughly
Layouts
Strings
 In res/values
 strings.xml
 Application wide available strings
 Promotes good software engineering
 UI components made in the UI editor
should have text defined in strings.xml
 Strings are just one kind of ‘Value’ there
are many others
Manifest File
 Contains characteristics about your application
 When have more than one Activity in app, NEED
to specify it in manifest file
 Go to graphical view of the manifest file
 Add an Activity in the bottom right
 Browse for the name of the activity
 Need to specify Services and other components
too
 Also important to define permissions and external
libraries, like Google Maps API
Manifest File – Adding an Activity
Activities
 The basis of android applications
 A single Activity defines a single viewable
screen
 the actions, not the layout
 Can have multiple per application
 Each is a separate entity
 They have a structured life cycle
 Different events in their life happen either via
the user touching buttons or programmatically
Activities
Services
 Run in the background
 Can continue even if Activity that started it dies
 Should be used if something needs to be done while the user is
not interacting with application
 Otherwise, a thread is probably more applicable
 Should create a new thread in the service to do work in, since the
service runs in the main thread
 Can be bound to an application
 In which case will terminate when all applications bound to it
unbind
 Allows multiple applications to communicate with it via a common
interface
 Needs to be declared in manifest file
 Like Activities, has a structured life cycle
Services
Running in Eclipse
 Similar to launching a regular Java app, use
the launch configurations
 Specify an Android Application and create a
new one
 Specify activity to be run
 Can select a manual option, so each time
program is run, you are asked whether you
want to use the actual phone or the
emulator
 Otherwise, it should be smart and use whichever
one is available
Running in Eclipse
Running in Eclipse
Running in Eclipse
USB Debugging
 Should be enabled on phone to use
developer features
 In the main apps screen select Settings ->
Applications -> Development -> USB
debugging (it needs to be checked)
Android Debug Bridge
 Used for a wide variety of developer tasks
 Read from the log file
 Show what android devices are available
 Install android applications (.apk files)
 In the ‘platform-tools’ directory of the main
android sdk directory
 Recommend putting this directory and the ‘tools’
directory on the system path
 adb.exe
Debugging
 Instead of using traditional System.out.println, use the Log
class
 Imported with android.util.Log
 Multiple types of output (debug, warning, error, …)
 Log.d(<tag>,<string>)
 Can be read using logcat.
 Print out the whole log, which auto-updates
 adb logcat
 Erase log
 adb logcat –c
 Filter output via tags
 adb logcat <tag>:<msg type> *:S
 can have multiple <tag>:<msg type> filters
 <msg type> corresponds to debug, warning, error, etc.
 If use Log.d(), then <msg type> = D
 Reference
 http://developer.android.com/guide/developing/debugging/debugging-
log.html
Acknowledgements
 Android Developer’s Website
 Activity and Service life-cycle flow charts
 Tons of other Android info
 Google Maps API external library
 http://code.google.com/android/add-ons/google-apis/maps-overview.html
 MightyPocket
 http://www.mightypocket.com/2010/08/android-screenshots-screen-capture-screen-cast/
 Numerous Forums & other developer sites, including:
 http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html
 http://efreedom.com/Question/1-6070968/Google-Maps-Api-Directions
 http://www.mail-archive.com/android-developers@googlegroups.com/msg28487.html
 http://android.bigresource.com/ threads
 http://groups.google.com/group/android-developers threads
 Many http://stackoverflow.com threads
 http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html
 Zainan Victor Zhou – for advice and his own tutorial
Ad

More Related Content

What's hot (19)

Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
Andri Yadi
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
Dharani Kumar Madduri
 
Android development basics
Android development basicsAndroid development basics
Android development basics
Pramesh Gautam
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting Started
Ahsanul Karim
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from Scratch
Taufan Erfiyanto
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
Henk Laracker
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
nazzf
 
Android Overview
Android OverviewAndroid Overview
Android Overview
Raju Kadam
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2
Ahsanul Karim
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
Ahsanul Karim
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
Opersys inc.
 
Android
AndroidAndroid
Android
Shubham Agrawal
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
Ajailal Parackal
 
FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)
Nehemiah Tan
 
ANDROID
ANDROIDANDROID
ANDROID
Ranjan Som
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
Ganesh Waghmare
 
6 Months Industrial Training in Android
6 Months Industrial Training in Android6 Months Industrial Training in Android
6 Months Industrial Training in Android
Arcadian Learning
 
Basic android development
Basic android developmentBasic android development
Basic android development
Upanya Singh
 
Android application development
Android application developmentAndroid application development
Android application development
MadhuprakashR1
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
Andri Yadi
 
Android development basics
Android development basicsAndroid development basics
Android development basics
Pramesh Gautam
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting Started
Ahsanul Karim
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from Scratch
Taufan Erfiyanto
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
Henk Laracker
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
nazzf
 
Android Overview
Android OverviewAndroid Overview
Android Overview
Raju Kadam
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2
Ahsanul Karim
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
Ahsanul Karim
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
Opersys inc.
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
Ajailal Parackal
 
FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)FYPJ - Cerebral Android App Development (Report)
FYPJ - Cerebral Android App Development (Report)
Nehemiah Tan
 
6 Months Industrial Training in Android
6 Months Industrial Training in Android6 Months Industrial Training in Android
6 Months Industrial Training in Android
Arcadian Learning
 
Basic android development
Basic android developmentBasic android development
Basic android development
Upanya Singh
 
Android application development
Android application developmentAndroid application development
Android application development
MadhuprakashR1
 

Viewers also liked (12)

Industrial Training in Window Application
Industrial Training in Window ApplicationIndustrial Training in Window Application
Industrial Training in Window Application
Arcadian Learning
 
OpenStack Training in Mohali
OpenStack Training in MohaliOpenStack Training in Mohali
OpenStack Training in Mohali
Arcadian Learning
 
Industrial Training in Mobile Application
Industrial Training in Mobile ApplicationIndustrial Training in Mobile Application
Industrial Training in Mobile Application
Arcadian Learning
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
Arcadian Learning
 
Application Development -iOS
Application Development -iOSApplication Development -iOS
Application Development -iOS
Arcadian Learning
 
Virtualization Training
Virtualization TrainingVirtualization Training
Virtualization Training
Arcadian Learning
 
6 Months Industrial Training in Big Data in Chandigarh
6 Months Industrial Training in Big Data in Chandigarh6 Months Industrial Training in Big Data in Chandigarh
6 Months Industrial Training in Big Data in Chandigarh
Arcadian Learning
 
6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework
Arcadian Learning
 
6 Weeks Industrial Training In Telecom In Chandigarh
6 Weeks Industrial Training In Telecom In Chandigarh6 Weeks Industrial Training In Telecom In Chandigarh
6 Weeks Industrial Training In Telecom In Chandigarh
Arcadian Learning
 
Android summer training report
Android summer training reportAndroid summer training report
Android summer training report
Shashendra Singh
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training report
Anurag Gautam
 
Android report
Android reportAndroid report
Android report
blogger at indiandswad
 
Industrial Training in Window Application
Industrial Training in Window ApplicationIndustrial Training in Window Application
Industrial Training in Window Application
Arcadian Learning
 
OpenStack Training in Mohali
OpenStack Training in MohaliOpenStack Training in Mohali
OpenStack Training in Mohali
Arcadian Learning
 
Industrial Training in Mobile Application
Industrial Training in Mobile ApplicationIndustrial Training in Mobile Application
Industrial Training in Mobile Application
Arcadian Learning
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
Arcadian Learning
 
Application Development -iOS
Application Development -iOSApplication Development -iOS
Application Development -iOS
Arcadian Learning
 
6 Months Industrial Training in Big Data in Chandigarh
6 Months Industrial Training in Big Data in Chandigarh6 Months Industrial Training in Big Data in Chandigarh
6 Months Industrial Training in Big Data in Chandigarh
Arcadian Learning
 
6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework
Arcadian Learning
 
6 Weeks Industrial Training In Telecom In Chandigarh
6 Weeks Industrial Training In Telecom In Chandigarh6 Weeks Industrial Training In Telecom In Chandigarh
6 Weeks Industrial Training In Telecom In Chandigarh
Arcadian Learning
 
Android summer training report
Android summer training reportAndroid summer training report
Android summer training report
Shashendra Singh
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training report
Anurag Gautam
 
Ad

Similar to Industrial Training in Android Application (20)

Android
AndroidAndroid
Android
Jesus_Aguirre
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
katayoon_bz
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Ed Zel
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Techacademy Software
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Keshav Chauhan
 
Android-Tutorial.ppt
Android-Tutorial.pptAndroid-Tutorial.ppt
Android-Tutorial.ppt
siddharthsingh496426
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Avinash Nandakumar
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Alberto Jr Gaudicos
 
Android best training-in-mumbai
Android best training-in-mumbaiAndroid best training-in-mumbai
Android best training-in-mumbai
vibrantuser
 
Android Development project
Android Development projectAndroid Development project
Android Development project
Minhaj Kazi
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
sjmarsh
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
Ted Chien
 
Android
AndroidAndroid
Android
BVP GTUG
 
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
Gunjan Kumar
 
Google Android
Google AndroidGoogle Android
Google Android
Michael Angelo Rivera
 
Rola azab (2)
Rola azab (2)Rola azab (2)
Rola azab (2)
Rola Azab
 
Android App Development (Basics)
Android App Development (Basics)Android App Development (Basics)
Android App Development (Basics)
Alberto Rubalcaba Stockman
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
Parinita03
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
AnuSahniNCI
 
Android - Android Application Configuration
Android - Android Application ConfigurationAndroid - Android Application Configuration
Android - Android Application Configuration
Vibrant Technologies & Computers
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
katayoon_bz
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Ed Zel
 
Android best training-in-mumbai
Android best training-in-mumbaiAndroid best training-in-mumbai
Android best training-in-mumbai
vibrantuser
 
Android Development project
Android Development projectAndroid Development project
Android Development project
Minhaj Kazi
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
sjmarsh
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
Ted Chien
 
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
Gunjan Kumar
 
Rola azab (2)
Rola azab (2)Rola azab (2)
Rola azab (2)
Rola Azab
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
Parinita03
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
AnuSahniNCI
 
Ad

More from Arcadian Learning (12)

StackLabs-DataDriven Labs - iPhone App Development Training in Mohali
StackLabs-DataDriven Labs - iPhone App Development  Training in MohaliStackLabs-DataDriven Labs - iPhone App Development  Training in Mohali
StackLabs-DataDriven Labs - iPhone App Development Training in Mohali
Arcadian Learning
 
Best Industrial Training in Android
Best Industrial Training in AndroidBest Industrial Training in Android
Best Industrial Training in Android
Arcadian Learning
 
6 Weeks Industrial Training in Android Application
6 Weeks Industrial Training in Android Application   6 Weeks Industrial Training in Android Application
6 Weeks Industrial Training in Android Application
Arcadian Learning
 
6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing 6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing
Arcadian Learning
 
Industrial Training in Software Testing
Industrial Training in Software TestingIndustrial Training in Software Testing
Industrial Training in Software Testing
Arcadian Learning
 
Industrial Training in PhoneGap Application
Industrial Training in PhoneGap ApplicationIndustrial Training in PhoneGap Application
Industrial Training in PhoneGap Application
Arcadian Learning
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
Arcadian Learning
 
Training in iOS Development
Training in iOS DevelopmentTraining in iOS Development
Training in iOS Development
Arcadian Learning
 
MongoDB Training
MongoDB TrainingMongoDB Training
MongoDB Training
Arcadian Learning
 
Cloud Computing Industrial Training In Chandigarh
Cloud Computing Industrial Training In ChandigarhCloud Computing Industrial Training In Chandigarh
Cloud Computing Industrial Training In Chandigarh
Arcadian Learning
 
Cloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStackCloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStack
Arcadian Learning
 
iPhone And Its Features
iPhone And Its FeaturesiPhone And Its Features
iPhone And Its Features
Arcadian Learning
 
StackLabs-DataDriven Labs - iPhone App Development Training in Mohali
StackLabs-DataDriven Labs - iPhone App Development  Training in MohaliStackLabs-DataDriven Labs - iPhone App Development  Training in Mohali
StackLabs-DataDriven Labs - iPhone App Development Training in Mohali
Arcadian Learning
 
Best Industrial Training in Android
Best Industrial Training in AndroidBest Industrial Training in Android
Best Industrial Training in Android
Arcadian Learning
 
6 Weeks Industrial Training in Android Application
6 Weeks Industrial Training in Android Application   6 Weeks Industrial Training in Android Application
6 Weeks Industrial Training in Android Application
Arcadian Learning
 
6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing 6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing
Arcadian Learning
 
Industrial Training in Software Testing
Industrial Training in Software TestingIndustrial Training in Software Testing
Industrial Training in Software Testing
Arcadian Learning
 
Industrial Training in PhoneGap Application
Industrial Training in PhoneGap ApplicationIndustrial Training in PhoneGap Application
Industrial Training in PhoneGap Application
Arcadian Learning
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
Arcadian Learning
 
Cloud Computing Industrial Training In Chandigarh
Cloud Computing Industrial Training In ChandigarhCloud Computing Industrial Training In Chandigarh
Cloud Computing Industrial Training In Chandigarh
Arcadian Learning
 
Cloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStackCloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStack
Arcadian Learning
 

Recently uploaded (20)

Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 

Industrial Training in Android Application

  • 2. References  This tutorial is a brief overview of some major concepts…Android is much richer and more complex  Developer’s Guide  http://developer.android.com/guide/index.html  API Reference  http://developer.android.com/reference/packages.html
  • 3. Tools  Phone  Eclipse ( http://www.eclipse.org/downloads/ )  Android Plugin (ADT)  Android SDK ( http://developer.android.com/sdk/index.html )  Install everything except Additional SDK Platforms, unless you want to  Windows Users: may need to install Motorola Driver directly ( http://www.motorola.com/Support/US-EN/Support- Homepage/Software_and_Drivers/USB-and-PC-Charging- Drivers )
  • 4. Android SDK  Once installed open the SDK Manager  Install the desired packages  Create an Android Virtual Device (AVD)
  • 6. AVD
  • 7. ADT Plugin  In Eclipse, go to Help -> Install New Software  Click ‘Add’ in top right  Enter:  Name: ADT Plugin  Location: https://dl-ssl.google.com/android/eclipse/  Click OK, then select ‘Developer Tools’, click Next  Click Next and then Finish  Afterwards, restart Eclipse  Specify SDK location (next 3 slides)  Must do this every time start a new project in a new location (at least in Windows)
  • 13. Project Components  src – your source code  gen – auto-generated code (usually just R.java)  Included libraries  Resources  Drawables (like .png images)  Layouts  Values (like strings)  Manifest file
  • 14. XML  Used to define some of the resources  Layouts (UI)  Strings  Manifest file  Shouldn’t usually have to edit it directly, Eclipse can do that for you  Preferred way of creating UIs  Separates the description of the layout from any actual code that controls it  Can easily take a UI from one platform to another
  • 15. R Class  Auto-generated: you shouldn’t edit it  Contains IDs of the project resources  Enforces good software engineering  Use findViewById and Resources object to get access to the resources  Ex. Button b = (Button)findViewById(R.id.button1)  Ex. getResources().getString(R.string.hello));
  • 16. Layouts  Eclipse has a great UI creator  Generates the XML for you  Composed of View objects  Can be specified for portrait and landscape mode  Use same file name, so can make completely different UIs for the orientations without modifying any code
  • 18. Layouts  Click ‘Create’ to make layout modifications  When in portrait mode can select ‘Portrait’ to make a res sub folder for portrait layouts  Likewise for Landscape layouts while in landscape mode  Will create folders titled ‘layout-port’ and ‘layout-land’  Note: these ‘port’ and ‘land’ folders are examples of ‘alternate layouts’, see here for more info  http://developer.android.com/guide/topics/resources/providing-resources.html  Avoid errors by making sure components have the same id in both orientations, and that you’ve tested each orientation thoroughly
  • 20. Strings  In res/values  strings.xml  Application wide available strings  Promotes good software engineering  UI components made in the UI editor should have text defined in strings.xml  Strings are just one kind of ‘Value’ there are many others
  • 21. Manifest File  Contains characteristics about your application  When have more than one Activity in app, NEED to specify it in manifest file  Go to graphical view of the manifest file  Add an Activity in the bottom right  Browse for the name of the activity  Need to specify Services and other components too  Also important to define permissions and external libraries, like Google Maps API
  • 22. Manifest File – Adding an Activity
  • 23. Activities  The basis of android applications  A single Activity defines a single viewable screen  the actions, not the layout  Can have multiple per application  Each is a separate entity  They have a structured life cycle  Different events in their life happen either via the user touching buttons or programmatically
  • 25. Services  Run in the background  Can continue even if Activity that started it dies  Should be used if something needs to be done while the user is not interacting with application  Otherwise, a thread is probably more applicable  Should create a new thread in the service to do work in, since the service runs in the main thread  Can be bound to an application  In which case will terminate when all applications bound to it unbind  Allows multiple applications to communicate with it via a common interface  Needs to be declared in manifest file  Like Activities, has a structured life cycle
  • 27. Running in Eclipse  Similar to launching a regular Java app, use the launch configurations  Specify an Android Application and create a new one  Specify activity to be run  Can select a manual option, so each time program is run, you are asked whether you want to use the actual phone or the emulator  Otherwise, it should be smart and use whichever one is available
  • 31. USB Debugging  Should be enabled on phone to use developer features  In the main apps screen select Settings -> Applications -> Development -> USB debugging (it needs to be checked)
  • 32. Android Debug Bridge  Used for a wide variety of developer tasks  Read from the log file  Show what android devices are available  Install android applications (.apk files)  In the ‘platform-tools’ directory of the main android sdk directory  Recommend putting this directory and the ‘tools’ directory on the system path  adb.exe
  • 33. Debugging  Instead of using traditional System.out.println, use the Log class  Imported with android.util.Log  Multiple types of output (debug, warning, error, …)  Log.d(<tag>,<string>)  Can be read using logcat.  Print out the whole log, which auto-updates  adb logcat  Erase log  adb logcat –c  Filter output via tags  adb logcat <tag>:<msg type> *:S  can have multiple <tag>:<msg type> filters  <msg type> corresponds to debug, warning, error, etc.  If use Log.d(), then <msg type> = D  Reference  http://developer.android.com/guide/developing/debugging/debugging- log.html
  • 34. Acknowledgements  Android Developer’s Website  Activity and Service life-cycle flow charts  Tons of other Android info  Google Maps API external library  http://code.google.com/android/add-ons/google-apis/maps-overview.html  MightyPocket  http://www.mightypocket.com/2010/08/android-screenshots-screen-capture-screen-cast/  Numerous Forums & other developer sites, including:  http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html  http://efreedom.com/Question/1-6070968/Google-Maps-Api-Directions  http://www.mail-archive.com/[email protected]/msg28487.html  http://android.bigresource.com/ threads  http://groups.google.com/group/android-developers threads  Many http://stackoverflow.com threads  http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html  Zainan Victor Zhou – for advice and his own tutorial