SlideShare a Scribd company logo
1 of 33
www.softserve.ua
Beginning Android
Copyright © 2015 SoftServe, Inc.
www.softserve.ua
Agenda1. Configure environment
1. Install java SDK
2. Install android SDK
3. Run and debug application
4. Real device debug enable
2. Support Libraries
3. Project structure
1. Manifest file
2. Java code
3. Resources (drawables, layouts, strings etc.)
4. Android components
1. Activities
2. Fragments
3. Services
4. Broadcast receivers
5. Content providers
6. Intent
7. Intent-filters
5. Database
6. Demo application
7. Resources
www.softserve.ua
Configure environment: Java SDK
Java 7 is supported, not all features. Supported features are:
Diamond operator (<>)
String switch
Multiple-catch (catch (Exc1 | Exc2 e))
Underscore in number literals (1_234_567)
Binary literals (0b1110111)
www.softserve.ua
Configure environment: Install Android SDK
https://developer.android.com/sdk/installing/index.html
www.softserve.ua
Configure environment: Adding SDK Packages
SDK Tools- Required
SDK Platform-tools- Required
SDK Build Tools- Required (at least last version)
SDK Platform- Required (last version)
Extras Android Support Repository- Recommended (to use Navigation drawer, compatible action bar,
etc.)
www.softserve.ua
Configure environment: Run and debug application
What to choose to run/debug application:
1. Standard emulator
+ Part of SDK
- Very slow
2. Genymotion (https://www.genymotion.com)
+ Faster than standard emulator
+ Free
- Need to register on home site, install emulator, install IDE plugin
3. Real device
+ Faster than standard emulator
+ Better for testing application usability
- For some devices you may not find driver
Note: For real devices need to enable debugging:
www.softserve.ua
Configure environment: Real device debug enable
By default Developer options menu is hidden. To show menu do the following:
1. Go to: Settings > About phone (for Stock Android)
2. Click 7 times on “Build number” item
http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html
www.softserve.ua
Support Libraries
What are Support Libraries ?
The Android Support Library package is a set of code libraries that provide
backward-compatible APIs for older devices.
v4 Support Library - is designed to be used with Android 1.6
(API level 4). Add support important key classes Fragment, DrawerLayout etc.
v7 appcompat library - This library adds support for the Action Bar user
interface design pattern. This library includes support for material design user
interface implementations. (depends on the v4 Support Library)
www.softserve.ua
Project structure
AndroidManifest.xml – Every application must have it. It
describes:
a. Components: activities, broadcast receivers, content providers
and services.
b. Permissions: CALL_PHONE, INTERNET, VIBRATE,
READ_CONTACTS, RECEIVE_BOOT_COMPLETED
c. Intent-filters
java – Activities, Fragments and other java classes
res/drawable – types .png, .jpg, .gif, .9.png, xml
res/menu – menu xml files
res/layout – layout xml files
res/values – xml files: strings, styles
Android studio uses gradle as build system
www.softserve.ua
AndroidManifest.xml example
www.softserve.ua
res/drawable
BitmapDrawable - .png, .jpg, .gif
NinePatchDrawable - A PNG file with stretchable regions to allow image
resizing based on content (.9.png) [ tool: <Android_SDK>toolsdraw9patch.bat ]
ShapeDrawable - An XML file that defines a geometric shape, including colors
and gradients. Example:
www.softserve.ua
R.class• Auto-generated: you shouldn’t edit it
• Contains IDs of the project resources
• 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));
appbuildgeneratedsourcerdebug<package>appR.java
www.softserve.ua
Supporting Multiple Screens
http://developer.android.com/guide/practices/screens_support.html
Icon size examples:
MDPI - 48x48px (baseline)
HDPI - 72x72px
XHDPI - 96x96px
XXHDPI -180x180px
Density-independent pixel (dp) - A virtual pixel unit that
you should use when defining UI layout, to express layout
dimensions or position in a density-independent way.
MDPI (medium) ~160dpi (160px)
HDPI (high) ~240dpi
XHDPI (extra-high) ~320dpi
XXHDPI (extra-extra-high) ~480dpi
www.softserve.ua
Supporting Multiple Screens
www.softserve.ua
res/layout
Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they
contain, in the same way you create web pages in HTML — with a series of nested elements.
Each layout file must contain exactly one root element, which must be a View or ViewGroup
object
Use in activity example
Layout example
www.softserve.ua
Menu example
www.softserve.ua
res/values
dimens.xml – define dimensions for views and layouts
styles.xml – app styles (theme)
strings.xml – defined all string of application
www.softserve.ua
Android components
• Activities – visual user interface focused on a
single thing a user can do (window)
• Services – no visual interface – they run in the
background (but in UI thread)
• Broadcast Receivers – receive and react to
broadcast announcements
• Content Providers – allow data exchange
between applications
www.softserve.ua
Activities Life-cycle
Simple activity class
All activities must be defined in manifest file
www.softserve.ua
Fragments
Fragment - is modular section of an activity, which has its own lifecycle.
www.softserve.ua
ServicesService - This is the base
class for all services.
It uses your app main thread!
IntentService - best
option if you don't require that
your service handle multiple
requests
All services should be added to manifest:
www.softserve.ua
Broadcast Receivers
Broadcast receiver - is an Android component which
allows you to register for system or application events. All
registered receivers for an event are notified by the Android
runtime once this event happens.
www.softserve.ua
Broadcast Receivers
For example, applications can register for the
ACTION_BOOT_COMPLETED system event which is fired once the
Android system has completed the boot process.
www.softserve.ua
Content Providers
Content Providers – used to shared data
between applications.
You don't need to develop your own provider if you don't
intend to share your data with other applications.
Android has 2 content provides:
Calendar Provider and Contacts Provider
www.softserve.ua
Content Providers
Find contact by name example
www.softserve.ua
Intents
An Intent is a messaging object you can use
to request an action from another app
component.
Used to start activity, service, deliver a
broadcast
www.softserve.ua
Intents
Intent Types
Explicit intents specify the component to start by name.
Allows start a component in your own app.
Explicit intents example:
Implicit intents do not name a specific component, but
instead declare a general action to perform, which allows a
component from another app to handle it
www.softserve.ua
Intents
Implicit intents example. Share plain text
http://stackoverflow.com/questions/13065838/what-are-the-possible-
intent-types-for-intent-settypetype
www.softserve.ua
Intent-filtersTo advertise which implicit intents your app can receive, declare one or more intent filters
Main activity
filter example
Receive text
filter example
www.softserve.ua
DatabaseA useful set of APIs is
available in the
SQLiteOpenHelper class.
To use
SQLiteOpenHelper, create
a subclass that overrides
the onCreate(),
onUpgrade() and
onOpen() callback
methods.
All you need to do is call
getWritableDatabase() or
getReadableDatabase().
www.softserve.ua
Resources
Java 7 language features with Android
http://stackoverflow.com/questions/7153989/java-7-language-features-with-android
Android developers
https://developer.android.com/guide/index.html
When should the dimens.xml file be used in Android?
http://stackoverflow.com/questions/7508493/when-should-the-dimens-xml-file-be-used-in-android
Version of SQLite used in Android?
http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android
Density-independent Pixels
https://www.youtube.com/watch?v=zhszwkcay2A&index=93&list=WL
Nine-patch (.9.png)
http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
www.softserve.ua
www.softserve.ua

More Related Content

What's hot

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1Borhan Otour
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorialnirajsimulanis
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OSPankaj Maheshwari
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Android application development
Android application developmentAndroid application development
Android application developmentslidesuren
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2DSC GVP
 
Introduction to Android for Quality Engineers
Introduction to Android for Quality EngineersIntroduction to Android for Quality Engineers
Introduction to Android for Quality EngineersAhmed Faidy
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App DevelopmentAbhijeet Gupta
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1Kalluri Vinay Reddy
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewAhsanul Karim
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barKalluri Vinay Reddy
 
Chapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action barChapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action barKalluri Vinay Reddy
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application FundamentalsVikalp Jain
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentAhsanul Karim
 
Lecture 3 getting active through activities
Lecture 3 getting active through activities Lecture 3 getting active through activities
Lecture 3 getting active through activities Ahsanul Karim
 

What's hot (19)

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorial
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2
 
Introduction to Android for Quality Engineers
Introduction to Android for Quality EngineersIntroduction to Android for Quality Engineers
Introduction to Android for Quality Engineers
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
Android Introduction by Kajal
Android Introduction by KajalAndroid Introduction by Kajal
Android Introduction by Kajal
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick Overview
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action bar
 
Chapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action barChapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action bar
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application Fundamentals
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver Component
 
Lecture 3 getting active through activities
Lecture 3 getting active through activities Lecture 3 getting active through activities
Lecture 3 getting active through activities
 
S_final thesis
S_final thesisS_final thesis
S_final thesis
 

Viewers also liked

Gioi thieu dv GAPIT_2015_Vie
Gioi thieu dv GAPIT_2015_VieGioi thieu dv GAPIT_2015_Vie
Gioi thieu dv GAPIT_2015_VieUyen Huynh
 
ANDROID IEEE PROJECT TITLES 2014
ANDROID IEEE PROJECT TITLES 2014ANDROID IEEE PROJECT TITLES 2014
ANDROID IEEE PROJECT TITLES 2014SHPINE TECHNOLOGIES
 
Embedded project titles1:2015-2016
Embedded project titles1:2015-2016Embedded project titles1:2015-2016
Embedded project titles1:2015-2016SHPINE TECHNOLOGIES
 
Plagiarism for Faculty Workshop
Plagiarism for Faculty WorkshopPlagiarism for Faculty Workshop
Plagiarism for Faculty WorkshopCathy Burwell
 
PROJECTS FROM SHPINE TECHNOLOGIES
PROJECTS FROM SHPINE TECHNOLOGIESPROJECTS FROM SHPINE TECHNOLOGIES
PROJECTS FROM SHPINE TECHNOLOGIESSHPINE TECHNOLOGIES
 
Scopus Overview
Scopus OverviewScopus Overview
Scopus OverviewFSC632
 
Android ieee project titles 2015 2016
Android ieee project titles 2015 2016Android ieee project titles 2015 2016
Android ieee project titles 2015 2016SHPINE TECHNOLOGIES
 
Why publish in an international journal?
Why publish in an international journal?Why publish in an international journal?
Why publish in an international journal?Anindito Subagyo
 
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014SHPINE TECHNOLOGIES
 
Introduction to iOS and Objective-C
Introduction to iOS and Objective-CIntroduction to iOS and Objective-C
Introduction to iOS and Objective-CDaniela Da Cruz
 
Introduction To Android - Short
Introduction To Android - ShortIntroduction To Android - Short
Introduction To Android - ShortMike Wolfson
 
SOFTWARE MANUAL TESTING SYLLABUS
SOFTWARE MANUAL TESTING SYLLABUSSOFTWARE MANUAL TESTING SYLLABUS
SOFTWARE MANUAL TESTING SYLLABUSSHPINE TECHNOLOGIES
 

Viewers also liked (20)

Gioi thieu dv GAPIT_2015_Vie
Gioi thieu dv GAPIT_2015_VieGioi thieu dv GAPIT_2015_Vie
Gioi thieu dv GAPIT_2015_Vie
 
Matlab titles 2015 2016
Matlab titles 2015 2016Matlab titles 2015 2016
Matlab titles 2015 2016
 
Android os by jje
Android os by jjeAndroid os by jje
Android os by jje
 
ANDROID IEEE PROJECT TITLES 2014
ANDROID IEEE PROJECT TITLES 2014ANDROID IEEE PROJECT TITLES 2014
ANDROID IEEE PROJECT TITLES 2014
 
Marshmallow
MarshmallowMarshmallow
Marshmallow
 
IEEE PROJECT CENTER IN CHENNAI
IEEE PROJECT CENTER IN CHENNAIIEEE PROJECT CENTER IN CHENNAI
IEEE PROJECT CENTER IN CHENNAI
 
Embedded project titles1:2015-2016
Embedded project titles1:2015-2016Embedded project titles1:2015-2016
Embedded project titles1:2015-2016
 
Plagiarism for Faculty Workshop
Plagiarism for Faculty WorkshopPlagiarism for Faculty Workshop
Plagiarism for Faculty Workshop
 
Java titles 2015 2016
Java titles 2015 2016Java titles 2015 2016
Java titles 2015 2016
 
Dot Net Course Syllabus
Dot Net Course SyllabusDot Net Course Syllabus
Dot Net Course Syllabus
 
PROJECTS FROM SHPINE TECHNOLOGIES
PROJECTS FROM SHPINE TECHNOLOGIESPROJECTS FROM SHPINE TECHNOLOGIES
PROJECTS FROM SHPINE TECHNOLOGIES
 
Java course
Java course Java course
Java course
 
Scopus Overview
Scopus OverviewScopus Overview
Scopus Overview
 
JAVA TITLES 2014
JAVA TITLES 2014JAVA TITLES 2014
JAVA TITLES 2014
 
Android ieee project titles 2015 2016
Android ieee project titles 2015 2016Android ieee project titles 2015 2016
Android ieee project titles 2015 2016
 
Why publish in an international journal?
Why publish in an international journal?Why publish in an international journal?
Why publish in an international journal?
 
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014
EMBEDDED-MICRO CONTROLLER BASED WIRELESS PROJECTS TITLES2014
 
Introduction to iOS and Objective-C
Introduction to iOS and Objective-CIntroduction to iOS and Objective-C
Introduction to iOS and Objective-C
 
Introduction To Android - Short
Introduction To Android - ShortIntroduction To Android - Short
Introduction To Android - Short
 
SOFTWARE MANUAL TESTING SYLLABUS
SOFTWARE MANUAL TESTING SYLLABUSSOFTWARE MANUAL TESTING SYLLABUS
SOFTWARE MANUAL TESTING SYLLABUS
 

Similar to Beginning android

Introduction to android
Introduction to androidIntroduction to android
Introduction to androidjavalabsf
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architectureDilip Singh
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101Michael Angelo Rivera
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1Kainda Kiniel Daka
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptxallurestore
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfAbdullahMunir32
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Amit Saxena
 
Android overview
Android overviewAndroid overview
Android overviewHas Taiar
 
01 introduction to android
01 introduction to android01 introduction to android
01 introduction to androidSokngim Sa
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 

Similar to Beginning android (20)

Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 
Android beginners David
Android beginners DavidAndroid beginners David
Android beginners David
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptx
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdf
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1
 
Android overview
Android overviewAndroid overview
Android overview
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
01 introduction to android
01 introduction to android01 introduction to android
01 introduction to android
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 

Recently uploaded

Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientiajfrenchau
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...Amil Baba Mangal Maseeh
 
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️soniya singh
 
Deerfoot Church of Christ Bulletin 5 5 24
Deerfoot Church of Christ Bulletin 5 5 24Deerfoot Church of Christ Bulletin 5 5 24
Deerfoot Church of Christ Bulletin 5 5 24deerfootcoc
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...baharayali
 
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...anilsa9823
 
Lesson 3 - Heaven - the Christian's Destiny.pptx
Lesson 3 - Heaven - the Christian's Destiny.pptxLesson 3 - Heaven - the Christian's Destiny.pptx
Lesson 3 - Heaven - the Christian's Destiny.pptxCelso Napoleon
 
Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practicesaijazuddin14
 
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKVashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKAmil Baba Naveed Bangali
 
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jadu
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jaduFamous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jadu
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jaduAmil Baba Naveed Bangali
 
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKNo 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKAmil Baba Naveed Bangali
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...Amil Baba Mangal Maseeh
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1fa3el khair
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶anilsa9823
 
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Amil Baba Naveed Bangali
 
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsThe_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsNetwork Bible Fellowship
 
St. John's Church Parish Magazine - May 2024
St. John's Church Parish Magazine - May 2024St. John's Church Parish Magazine - May 2024
St. John's Church Parish Magazine - May 2024Chris Lyne
 
Genesis 1:7 || Meditate the Scripture daily verse by verse
Genesis 1:7  ||  Meditate the Scripture daily verse by verseGenesis 1:7  ||  Meditate the Scripture daily verse by verse
Genesis 1:7 || Meditate the Scripture daily verse by versemaricelcanoynuay
 

Recently uploaded (20)

Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientia
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
 
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
 
Deerfoot Church of Christ Bulletin 5 5 24
Deerfoot Church of Christ Bulletin 5 5 24Deerfoot Church of Christ Bulletin 5 5 24
Deerfoot Church of Christ Bulletin 5 5 24
 
English - The Story of Ahikar, Grand Vizier of Assyria.pdf
English - The Story of Ahikar, Grand Vizier of Assyria.pdfEnglish - The Story of Ahikar, Grand Vizier of Assyria.pdf
English - The Story of Ahikar, Grand Vizier of Assyria.pdf
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
 
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
 
Lesson 3 - Heaven - the Christian's Destiny.pptx
Lesson 3 - Heaven - the Christian's Destiny.pptxLesson 3 - Heaven - the Christian's Destiny.pptx
Lesson 3 - Heaven - the Christian's Destiny.pptx
 
Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practices
 
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKVashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
 
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jadu
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jaduFamous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jadu
Famous No1 Amil baba in UK/Australia, Canada, Germany Amil baba Kala jadu
 
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKNo 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
 
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
 
Call Girls In CP 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In CP 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In CP 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In CP 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsThe_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
 
St. John's Church Parish Magazine - May 2024
St. John's Church Parish Magazine - May 2024St. John's Church Parish Magazine - May 2024
St. John's Church Parish Magazine - May 2024
 
Genesis 1:7 || Meditate the Scripture daily verse by verse
Genesis 1:7  ||  Meditate the Scripture daily verse by verseGenesis 1:7  ||  Meditate the Scripture daily verse by verse
Genesis 1:7 || Meditate the Scripture daily verse by verse
 

Beginning android

  • 2. www.softserve.ua Agenda1. Configure environment 1. Install java SDK 2. Install android SDK 3. Run and debug application 4. Real device debug enable 2. Support Libraries 3. Project structure 1. Manifest file 2. Java code 3. Resources (drawables, layouts, strings etc.) 4. Android components 1. Activities 2. Fragments 3. Services 4. Broadcast receivers 5. Content providers 6. Intent 7. Intent-filters 5. Database 6. Demo application 7. Resources
  • 3. www.softserve.ua Configure environment: Java SDK Java 7 is supported, not all features. Supported features are: Diamond operator (<>) String switch Multiple-catch (catch (Exc1 | Exc2 e)) Underscore in number literals (1_234_567) Binary literals (0b1110111)
  • 4. www.softserve.ua Configure environment: Install Android SDK https://developer.android.com/sdk/installing/index.html
  • 5. www.softserve.ua Configure environment: Adding SDK Packages SDK Tools- Required SDK Platform-tools- Required SDK Build Tools- Required (at least last version) SDK Platform- Required (last version) Extras Android Support Repository- Recommended (to use Navigation drawer, compatible action bar, etc.)
  • 6. www.softserve.ua Configure environment: Run and debug application What to choose to run/debug application: 1. Standard emulator + Part of SDK - Very slow 2. Genymotion (https://www.genymotion.com) + Faster than standard emulator + Free - Need to register on home site, install emulator, install IDE plugin 3. Real device + Faster than standard emulator + Better for testing application usability - For some devices you may not find driver Note: For real devices need to enable debugging:
  • 7. www.softserve.ua Configure environment: Real device debug enable By default Developer options menu is hidden. To show menu do the following: 1. Go to: Settings > About phone (for Stock Android) 2. Click 7 times on “Build number” item http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html
  • 8. www.softserve.ua Support Libraries What are Support Libraries ? The Android Support Library package is a set of code libraries that provide backward-compatible APIs for older devices. v4 Support Library - is designed to be used with Android 1.6 (API level 4). Add support important key classes Fragment, DrawerLayout etc. v7 appcompat library - This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations. (depends on the v4 Support Library)
  • 9. www.softserve.ua Project structure AndroidManifest.xml – Every application must have it. It describes: a. Components: activities, broadcast receivers, content providers and services. b. Permissions: CALL_PHONE, INTERNET, VIBRATE, READ_CONTACTS, RECEIVE_BOOT_COMPLETED c. Intent-filters java – Activities, Fragments and other java classes res/drawable – types .png, .jpg, .gif, .9.png, xml res/menu – menu xml files res/layout – layout xml files res/values – xml files: strings, styles Android studio uses gradle as build system
  • 11. www.softserve.ua res/drawable BitmapDrawable - .png, .jpg, .gif NinePatchDrawable - A PNG file with stretchable regions to allow image resizing based on content (.9.png) [ tool: <Android_SDK>toolsdraw9patch.bat ] ShapeDrawable - An XML file that defines a geometric shape, including colors and gradients. Example:
  • 12. www.softserve.ua R.class• Auto-generated: you shouldn’t edit it • Contains IDs of the project resources • 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)); appbuildgeneratedsourcerdebug<package>appR.java
  • 13. www.softserve.ua Supporting Multiple Screens http://developer.android.com/guide/practices/screens_support.html Icon size examples: MDPI - 48x48px (baseline) HDPI - 72x72px XHDPI - 96x96px XXHDPI -180x180px Density-independent pixel (dp) - A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. MDPI (medium) ~160dpi (160px) HDPI (high) ~240dpi XHDPI (extra-high) ~320dpi XXHDPI (extra-extra-high) ~480dpi
  • 15. www.softserve.ua res/layout Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they contain, in the same way you create web pages in HTML — with a series of nested elements. Each layout file must contain exactly one root element, which must be a View or ViewGroup object Use in activity example Layout example
  • 17. www.softserve.ua res/values dimens.xml – define dimensions for views and layouts styles.xml – app styles (theme) strings.xml – defined all string of application
  • 18. www.softserve.ua Android components • Activities – visual user interface focused on a single thing a user can do (window) • Services – no visual interface – they run in the background (but in UI thread) • Broadcast Receivers – receive and react to broadcast announcements • Content Providers – allow data exchange between applications
  • 19. www.softserve.ua Activities Life-cycle Simple activity class All activities must be defined in manifest file
  • 20. www.softserve.ua Fragments Fragment - is modular section of an activity, which has its own lifecycle.
  • 21. www.softserve.ua ServicesService - This is the base class for all services. It uses your app main thread! IntentService - best option if you don't require that your service handle multiple requests All services should be added to manifest:
  • 22. www.softserve.ua Broadcast Receivers Broadcast receiver - is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.
  • 23. www.softserve.ua Broadcast Receivers For example, applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.
  • 24. www.softserve.ua Content Providers Content Providers – used to shared data between applications. You don't need to develop your own provider if you don't intend to share your data with other applications. Android has 2 content provides: Calendar Provider and Contacts Provider
  • 26. www.softserve.ua Intents An Intent is a messaging object you can use to request an action from another app component. Used to start activity, service, deliver a broadcast
  • 27. www.softserve.ua Intents Intent Types Explicit intents specify the component to start by name. Allows start a component in your own app. Explicit intents example: Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it
  • 28. www.softserve.ua Intents Implicit intents example. Share plain text http://stackoverflow.com/questions/13065838/what-are-the-possible- intent-types-for-intent-settypetype
  • 29. www.softserve.ua Intent-filtersTo advertise which implicit intents your app can receive, declare one or more intent filters Main activity filter example Receive text filter example
  • 30. www.softserve.ua DatabaseA useful set of APIs is available in the SQLiteOpenHelper class. To use SQLiteOpenHelper, create a subclass that overrides the onCreate(), onUpgrade() and onOpen() callback methods. All you need to do is call getWritableDatabase() or getReadableDatabase().
  • 31. www.softserve.ua Resources Java 7 language features with Android http://stackoverflow.com/questions/7153989/java-7-language-features-with-android Android developers https://developer.android.com/guide/index.html When should the dimens.xml file be used in Android? http://stackoverflow.com/questions/7508493/when-should-the-dimens-xml-file-be-used-in-android Version of SQLite used in Android? http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android Density-independent Pixels https://www.youtube.com/watch?v=zhszwkcay2A&index=93&list=WL Nine-patch (.9.png) http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch