SlideShare a Scribd company logo
1 of 44
Download to read offline
Parinda Rajapaksha
What is Android?
➔ Open source, Linux based OS
➔ Developed by Open Handset Alliance
➔ Since 2008
➔ Android market
○ Entertainment, communication, Social Media etc..
Android Versions
Why Android?
➔ Open source code
➔ Low barrier of entry
○ Can be developed in any platform
○ Only one time payment of $25
➔ Google Play store
➔ Businesses are investing for app development
Architecture
Building Blocks
➔ Activities
○ Single screen
○ Handle user interactions
➔ Services
○ Background processes
○ Local or remote
➔ Broadcast Receivers
○ Communication between OS and app
➔ Content Providers
○ Handle data
➔ Additional Components
○ Fragments, Views, Layouts, Intents, Resources,
Manifest
Activity Lifecycle
How Apps are built and run
1. Java compilation
Java byte codes
2. Convert to Dalvik bytecodes
Dalvik byte codes
3. Packaging
○ Using Android Asset Packaging Tool
4. Signing
5. Deployment
○ Using Android Debug Bridge
Dalvik vs ART
➔ Convert DEX bytecodes to machine code
➔ Dalvik - Just in time (JIT)
○ App opening slow
➔ ART - Ahead of time (AOT)
○ One time process
○ Fast app opening, Slow Installation
○ Takes more storage
Tools
➔ JDK
➔ IDE
○ Android Studio
○ Eclipse
➔ SDK
➔ AVD
➔ Build Tool (Gradle)
Project Structure
➔ Manifest.xml
➔ Java classes
➔ Resources
○ Layouts
○ Drawables
○ Assets
○ Animations
○ Menu
○ Colors, Strings, Styles
Let’s get our hands
dirty!!
SPEED
SplashActivity MainActivity PlayActivity PlayActivity
Android Design
Guidelines
Which languages should I use?
➔ Java
- Official language
➔ Kotlin
- Reduced boilerplate codes
➔ C / C++
- Use of Java NDK
- Game developments
➔ C#
- Beginner friendly for C or C++
- Supports Unity and Xamarin
➔ Corona
- Cross platform language
➔ Phone Gap
- Powered by Apache cordova
- WebView packaged like an app
➔ XML for layout designing
Application concerns
1. Which platform are you targeting?
- Mobile
- Tab
- Android TV
- Wear
- Android Auto
2. Know your audience
- Min SDK version?
Global Android version distribution as of August 2017
3. Choose your building blocks wisely
- Basic UI components
- Android support libraries
- Using 3rd party libraries from Jcenter
○ Reputation
○ Efficiency
○ Reusability
○ Eg: GSON, Retrofit, Universal Image Loader
4. Choosing a database
- Speed and ease of use
- SQLite
○ Built-in database
- Core data, ORM Lite, Realm
- Realm
○ NoSQL
○ Cross Platform support
○ Json support
○ Encryption support
○ Limitations?
Security concerns
➔ Requesting permissions
➔ How to avoid application being reverse engineered
- Proguard
- Keep valuable info in a server
○ API keys
○ Secret keys & tokens
○ Payment info
Usability concerns
➔ Application speed
- Don’t keep the users waiting
➔ Resource consumption
- Memory
- Power
- Data
➔ APK size
➔ Handle app crashes
- ANR dialogs
➔ Test Test Test
- Various devices and OS versions
- Manual testing
- Automated
○ Firebase Test Lab
○ Espresso
○ Robotium
Prepare for release
➔ Review the app Manifest.xml
- Application
- uses-permission
➔ Review the build configuration
- versionCode & versionName
- minSdkVerision & targetSdkVersion
➔ Signing the app
- Manual or Google App Signing
➔ Building a release APK
➔ Run Google Play Alpha Beta testing
- Eg: for In-app purchasing
➔ Publishing on Google Play
- Read user reviews
- Bug fixes
- New updates
7 Design Principles to remember...
1. Pictures are faster than words
2. If it looks the same, it should act the same
3. Decide for me but let me have the final say
4. Keep it brief
5. Make important things fast
6. Get to know me
7. Only interrupt me if it's important
Android Development
Course Outline
1. Understanding main building blocks
- Activities
- Activity life cycle
- Intents
- Contents
- Service providers
- Broadcast receivers
2. Understanding the Android project structure
- Manifest.xml
- Java classes
- Resources
○ Layouts
○ Drawables
○ Assets
○ Animations
○ Menu
○ Colors
○ Strings
○ Styles
3. Application fundamentals
- Creating Activities and Fragments to process user inputs
- Communicating with intents
- Working with Threads
○ RunOnUiThreads
○ Handlers and Runnables
○ AsyncTasks
- Handling Notifications
○ Using Broadcast Receivers and Services
- Understanding parameters of UI components
○ Layout hierarchy
○ Positioning
○ Handling multiple screen resolutions
- Language localizations
4. User interface designing
- Basic UI components
○ TextView, Button, Spinner etc...
- ListViews and Adapters
- Time and Date components
- Image and media components
- Alert dialogs, popups and toasts
- Advanced UI features
○ Navigation drawer
○ Action bar
○ Tab views, Toolbars and pages
○ Card views and Recycle views
○ Floating action button
- Applying themes and animations
- Material Design
5. Persisting application data
- Saving and Loading User Preferences
- Using SQLite database or
- 3rd party databases
○ Realm
○ Core Data
○ ORM Lite
6. Network communication
- Consuming Web Services Using HTTP
- Consuming JSON Services
7. Working with device specific features
- Using Maps, GPS and location based services
- Access to Bluetooth and Wifi
- Working with sensors
- Handling gestures
- Accessing Phone services (SMS, Call, MMS)
- Using network connectivity services (Cell networks, Wifi)
- Accessing Camera, Alarm and speakers
8. Publishing Android Application
- Preparing for release
- App signing
- Publishing to Google Play
Thank You!

More Related Content

Similar to Android development

AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentShean McManus
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android DevelopmentHayi Nukman
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneursRodrigo Gil
 
Mobile app development using Android SDK
Mobile app development using Android SDKMobile app development using Android SDK
Mobile app development using Android SDKJosh Clemm
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Opersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014Opersys inc.
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1drudolph11
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIOpersys inc.
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 

Similar to Android development (20)

AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web Development
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Mobile app development using Android SDK
Mobile app development using Android SDKMobile app development using Android SDK
Mobile app development using Android SDK
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014
 
Android presentation slide
Android presentation slideAndroid presentation slide
Android presentation slide
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014Embedded Android Workshop at Embedded World 2014
Embedded Android Workshop at Embedded World 2014
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VI
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
android
androidandroid
android
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 

More from Parinda Rajapaksha

Identifying adverse drug reactions by analyzing twitter messages
Identifying adverse drug reactions by analyzing twitter messagesIdentifying adverse drug reactions by analyzing twitter messages
Identifying adverse drug reactions by analyzing twitter messagesParinda Rajapaksha
 
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)Parinda Rajapaksha
 
The Needleman-Wunsch Algorithm for Sequence Alignment
The Needleman-Wunsch Algorithm for Sequence Alignment The Needleman-Wunsch Algorithm for Sequence Alignment
The Needleman-Wunsch Algorithm for Sequence Alignment Parinda Rajapaksha
 
Scientific methods in computer science
Scientific methods in computer scienceScientific methods in computer science
Scientific methods in computer scienceParinda Rajapaksha
 
Gift 4 life v 1.1 (Blood Camp Management System)
Gift 4 life v 1.1 (Blood Camp Management System)Gift 4 life v 1.1 (Blood Camp Management System)
Gift 4 life v 1.1 (Blood Camp Management System)Parinda Rajapaksha
 

More from Parinda Rajapaksha (8)

Realm mobile database
Realm mobile databaseRealm mobile database
Realm mobile database
 
Identifying adverse drug reactions by analyzing twitter messages
Identifying adverse drug reactions by analyzing twitter messagesIdentifying adverse drug reactions by analyzing twitter messages
Identifying adverse drug reactions by analyzing twitter messages
 
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)
Analysis of Feature Selection Algorithms (Branch & Bound and Beam search)
 
The Needleman-Wunsch Algorithm for Sequence Alignment
The Needleman-Wunsch Algorithm for Sequence Alignment The Needleman-Wunsch Algorithm for Sequence Alignment
The Needleman-Wunsch Algorithm for Sequence Alignment
 
Scientific methods in computer science
Scientific methods in computer scienceScientific methods in computer science
Scientific methods in computer science
 
Gift 4 life v 1.1 (Blood Camp Management System)
Gift 4 life v 1.1 (Blood Camp Management System)Gift 4 life v 1.1 (Blood Camp Management System)
Gift 4 life v 1.1 (Blood Camp Management System)
 
Ceylon tobacco company (ctc)
Ceylon tobacco company (ctc)Ceylon tobacco company (ctc)
Ceylon tobacco company (ctc)
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
 

Recently uploaded

Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pure
Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pureBromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pure
Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pureamy56318795
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsChandrakantDivate1
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsChandrakantDivate1
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312wphillips114
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...nishasame66
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesChandrakantDivate1
 

Recently uploaded (7)

Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pure
Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pureBromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pure
Bromazolam CAS 71368-80-4 high quality opiates, Safe transportation, 99% pure
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 

Android development

  • 2. What is Android? ➔ Open source, Linux based OS ➔ Developed by Open Handset Alliance ➔ Since 2008 ➔ Android market ○ Entertainment, communication, Social Media etc..
  • 4. Why Android? ➔ Open source code ➔ Low barrier of entry ○ Can be developed in any platform ○ Only one time payment of $25 ➔ Google Play store ➔ Businesses are investing for app development
  • 6. Building Blocks ➔ Activities ○ Single screen ○ Handle user interactions ➔ Services ○ Background processes ○ Local or remote
  • 7. ➔ Broadcast Receivers ○ Communication between OS and app
  • 8. ➔ Content Providers ○ Handle data ➔ Additional Components ○ Fragments, Views, Layouts, Intents, Resources, Manifest
  • 10. How Apps are built and run 1. Java compilation Java byte codes
  • 11. 2. Convert to Dalvik bytecodes Dalvik byte codes
  • 12. 3. Packaging ○ Using Android Asset Packaging Tool
  • 14. 5. Deployment ○ Using Android Debug Bridge
  • 15. Dalvik vs ART ➔ Convert DEX bytecodes to machine code ➔ Dalvik - Just in time (JIT) ○ App opening slow ➔ ART - Ahead of time (AOT) ○ One time process ○ Fast app opening, Slow Installation ○ Takes more storage
  • 16. Tools ➔ JDK ➔ IDE ○ Android Studio ○ Eclipse ➔ SDK ➔ AVD ➔ Build Tool (Gradle)
  • 17. Project Structure ➔ Manifest.xml ➔ Java classes ➔ Resources ○ Layouts ○ Drawables ○ Assets ○ Animations ○ Menu ○ Colors, Strings, Styles
  • 18. Let’s get our hands dirty!!
  • 21. Which languages should I use? ➔ Java - Official language ➔ Kotlin - Reduced boilerplate codes ➔ C / C++ - Use of Java NDK - Game developments
  • 22. ➔ C# - Beginner friendly for C or C++ - Supports Unity and Xamarin ➔ Corona - Cross platform language ➔ Phone Gap - Powered by Apache cordova - WebView packaged like an app ➔ XML for layout designing
  • 23. Application concerns 1. Which platform are you targeting? - Mobile - Tab - Android TV - Wear - Android Auto
  • 24. 2. Know your audience - Min SDK version? Global Android version distribution as of August 2017
  • 25. 3. Choose your building blocks wisely - Basic UI components - Android support libraries - Using 3rd party libraries from Jcenter ○ Reputation ○ Efficiency ○ Reusability ○ Eg: GSON, Retrofit, Universal Image Loader
  • 26. 4. Choosing a database - Speed and ease of use - SQLite ○ Built-in database - Core data, ORM Lite, Realm - Realm ○ NoSQL ○ Cross Platform support ○ Json support ○ Encryption support ○ Limitations?
  • 27. Security concerns ➔ Requesting permissions ➔ How to avoid application being reverse engineered - Proguard - Keep valuable info in a server ○ API keys ○ Secret keys & tokens ○ Payment info
  • 28. Usability concerns ➔ Application speed - Don’t keep the users waiting ➔ Resource consumption - Memory - Power - Data ➔ APK size
  • 29. ➔ Handle app crashes - ANR dialogs ➔ Test Test Test - Various devices and OS versions - Manual testing - Automated ○ Firebase Test Lab ○ Espresso ○ Robotium
  • 30. Prepare for release ➔ Review the app Manifest.xml - Application - uses-permission ➔ Review the build configuration - versionCode & versionName - minSdkVerision & targetSdkVersion ➔ Signing the app - Manual or Google App Signing
  • 31. ➔ Building a release APK ➔ Run Google Play Alpha Beta testing - Eg: for In-app purchasing ➔ Publishing on Google Play - Read user reviews - Bug fixes - New updates
  • 32. 7 Design Principles to remember... 1. Pictures are faster than words 2. If it looks the same, it should act the same 3. Decide for me but let me have the final say 4. Keep it brief 5. Make important things fast 6. Get to know me 7. Only interrupt me if it's important
  • 34. 1. Understanding main building blocks - Activities - Activity life cycle - Intents - Contents - Service providers - Broadcast receivers
  • 35. 2. Understanding the Android project structure - Manifest.xml - Java classes - Resources ○ Layouts ○ Drawables ○ Assets ○ Animations ○ Menu ○ Colors ○ Strings ○ Styles
  • 36. 3. Application fundamentals - Creating Activities and Fragments to process user inputs - Communicating with intents - Working with Threads ○ RunOnUiThreads ○ Handlers and Runnables ○ AsyncTasks
  • 37. - Handling Notifications ○ Using Broadcast Receivers and Services - Understanding parameters of UI components ○ Layout hierarchy ○ Positioning ○ Handling multiple screen resolutions - Language localizations
  • 38. 4. User interface designing - Basic UI components ○ TextView, Button, Spinner etc... - ListViews and Adapters - Time and Date components - Image and media components - Alert dialogs, popups and toasts
  • 39. - Advanced UI features ○ Navigation drawer ○ Action bar ○ Tab views, Toolbars and pages ○ Card views and Recycle views ○ Floating action button - Applying themes and animations - Material Design
  • 40. 5. Persisting application data - Saving and Loading User Preferences - Using SQLite database or - 3rd party databases ○ Realm ○ Core Data ○ ORM Lite
  • 41. 6. Network communication - Consuming Web Services Using HTTP - Consuming JSON Services
  • 42. 7. Working with device specific features - Using Maps, GPS and location based services - Access to Bluetooth and Wifi - Working with sensors - Handling gestures - Accessing Phone services (SMS, Call, MMS) - Using network connectivity services (Cell networks, Wifi) - Accessing Camera, Alarm and speakers
  • 43. 8. Publishing Android Application - Preparing for release - App signing - Publishing to Google Play