This document provides an introduction to Android app development. It begins with an overview of what Android is and its origins at Google. It then outlines the key aspects of developing apps for Android, including its app model, user experience features, internal architecture, and SDK. The document discusses debugging tools and techniques, alternative app marketplaces, and the core app components in Android like activities, services, and content providers.
I developed these slides for basic android training. I know some of you will laugh looing at them but if you are a beginner and want to have a rough idea on android development you can have a look at them. :)
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
The workshop deals with the design and implementation of applications for mobile devices using the Android operating system. Participants work at all stages of the development life-cycle from inception to deployment, whilst considering usability and device capabilities for a mobile application capable of meeting a functional specification. Participants are introduced to the programming environment for application development and have a hands-on approach to programming using the appropriate programming languages.
This Presentation (Android) is prepared by me for Education Purpose. And be careful for Hyperlinks. There are so many Hyperlinks. Just click on them.
Thank You
Mr. SOM
Introduction to Android App DevelopmentTodd Burgess
Presentation for Podcamp 2017 Toronto introducing how to do Android app development in Java. This is a basic introduction to what app development looks like Java and how to learn more
Android Development: Build Android App from ScratchTaufan Erfiyanto
a month ago, i have a change to held a one day workshop about Android development at Phetchaburi Rajabhat University, Thailand. The workshop is attended by students and lecturers. it is a pleasure to me to see many people that excited to learn android development.
This is a presentation slide of my presentation. in this presentation you will learn about how to build create a simple to do list app from scratch.
content of the presentation slide:
- Introduction: what Android is?
- Android development tools
- Creating Android Project
- Understanding the Project Structure
- Creating Android Emulator
- Running Android Project on Emulator
- Running Android Project on Device
- Creating User Interface
- Manipulating Widget
- Creating To Do List App
- Integrating SQLite Database to Android Project
This slide from Android Application Programming Seminar at a Technical University of Vietnam.
Throughout the slide, audience will have the general knowledge about Android OS, Architecture. The slide also provide the Android Application structure, the choices of framework or language to develop an Android application.
Real Time Audio is an application is written for this seminar.
Everyone can download from Google Play:
https://play.google.com/store/apps/details?id=junoteam.com.realtimerecording
Arcadian Learning is an Industrial Training Company with 50 years of Industry Expertise on Planning, Implementation and Operation of the Networks Offering six months Industrial Training program on Cloud Computing, Telecom, Big Data and Application Development.
The Era of Internet of thing mobile application development more effective and useful and also provide Android Training, iPhone Training and PhoneGap Training.
http://www.arcadianlearning.com/application-web-development.html
This PPT is designed to give you a high level overview of Android as a development platform. It provide introduction to what the Android operating system is, how we got here, what makes it fundamentally different than any other platform, and how to take advantage of its uniqueness. By the end of this course, you will have a complete understanding of the entire operating system, at a high level
I developed these slides for basic android training. I know some of you will laugh looing at them but if you are a beginner and want to have a rough idea on android development you can have a look at them. :)
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
The workshop deals with the design and implementation of applications for mobile devices using the Android operating system. Participants work at all stages of the development life-cycle from inception to deployment, whilst considering usability and device capabilities for a mobile application capable of meeting a functional specification. Participants are introduced to the programming environment for application development and have a hands-on approach to programming using the appropriate programming languages.
This Presentation (Android) is prepared by me for Education Purpose. And be careful for Hyperlinks. There are so many Hyperlinks. Just click on them.
Thank You
Mr. SOM
Introduction to Android App DevelopmentTodd Burgess
Presentation for Podcamp 2017 Toronto introducing how to do Android app development in Java. This is a basic introduction to what app development looks like Java and how to learn more
Android Development: Build Android App from ScratchTaufan Erfiyanto
a month ago, i have a change to held a one day workshop about Android development at Phetchaburi Rajabhat University, Thailand. The workshop is attended by students and lecturers. it is a pleasure to me to see many people that excited to learn android development.
This is a presentation slide of my presentation. in this presentation you will learn about how to build create a simple to do list app from scratch.
content of the presentation slide:
- Introduction: what Android is?
- Android development tools
- Creating Android Project
- Understanding the Project Structure
- Creating Android Emulator
- Running Android Project on Emulator
- Running Android Project on Device
- Creating User Interface
- Manipulating Widget
- Creating To Do List App
- Integrating SQLite Database to Android Project
This slide from Android Application Programming Seminar at a Technical University of Vietnam.
Throughout the slide, audience will have the general knowledge about Android OS, Architecture. The slide also provide the Android Application structure, the choices of framework or language to develop an Android application.
Real Time Audio is an application is written for this seminar.
Everyone can download from Google Play:
https://play.google.com/store/apps/details?id=junoteam.com.realtimerecording
Arcadian Learning is an Industrial Training Company with 50 years of Industry Expertise on Planning, Implementation and Operation of the Networks Offering six months Industrial Training program on Cloud Computing, Telecom, Big Data and Application Development.
The Era of Internet of thing mobile application development more effective and useful and also provide Android Training, iPhone Training and PhoneGap Training.
http://www.arcadianlearning.com/application-web-development.html
This PPT is designed to give you a high level overview of Android as a development platform. It provide introduction to what the Android operating system is, how we got here, what makes it fundamentally different than any other platform, and how to take advantage of its uniqueness. By the end of this course, you will have a complete understanding of the entire operating system, at a high level
Android App Development Company PresentationSystango Ltd
Systango provides custom affordable web design, mobile app development, android app development, ios app development, wordpress app development, game, ecommerce development services for your unique business needs in NY, SFO, Dallas, LA, London.
Psychometric tests are standardized tools to help an employer create a level playing and fair field for all the employees that he may want to be assessed. It helps them compare different candidates , their strengths and weaknesses regardless of their backgrounds.
Leveraging Android for the Internet of Things with Eclipse M2MBenjamin Cabé
The Eclipse M2M (Machine-to-Machine) open source initiative delivers a stack of open source building blocks that accelerate the development of connected solutions.
In this session, you’ll be briefly introduced to the Eclipse M2M projects and discover cool end-to-end examples (Augmented Reality anyone?) combining the use of Android API with Open Hardware platforms (Arduino, Raspberry Pi…) for doing fleet tracking, remote monitoring, home automation, and much more.
This presentation contains the basic information you need to know about operational amplifier.
I have tried to cover all the basic info. If anything is left out or you have any suggestions i will appreciate it.
Custom Android App Development – Web Animation IndiaMarion Welch
Being associate intimate Android App Development Company, our Android dev team offers a guarantee to our purchasers for a wonderful Android app development service that maximizes the potency of their businesses. we tend to ar exploitation fashionable technologies to form a client’s business complete that competes with today’s technology-obsessed world. Our Android developers have a powerful command of Java, C, C++ HTML, CSS that helps them to write down apps for the Android platform. Our Android app development team develops associate app for pretty much all Google Play’s major classes, as well as social networking, travel, utility, diversion, education, e-commerce so on.
"Automatic Intelligent Plant Irrigation System using Arduino and GSM board"Disha Modi
Automatic irrigation is a form of irrigation system that incorporates the theory of control, power of wireless technology and feedback system with irrigation. The aim of our project is not only to minimize this manual intervention by the farmer in farm field, but also to successfully water garden plants planted in pots too. Which is why we are using micro- controller based Automated Irrigation system will serve the following purposes: 1) As there is no un-planned usage of water, a lot of water is saved from being wasted. 2) The irrigation is done only when there is not enough moisture in the soil and the microcontroller decides when should the pump be turned on/off, saves a lot time for the farmers. This also gives much needed rest to the farmers and helps, as they don’t have to go and turn the pump on/off manually. 3)This irrigation system can be monitor by user wirelessly. User can receive notification and can provide proper commands via his cell phone whenever necessary.
It was a seminar topic for Harish Kumar Upadhyay of IT-A, CUSAT (2012 passout)
It deals with the introduction and architecture of Android, its uses and one project into based on Android
Outstanding Improvement Award Outstanding Improvement Awardpravinmali2191
The chemicals industry (industrial chemicals, pharmaceuticals, pesticides, biocides, food and feed additives and cosmetics) is one of the largest industrial sectors in the world and one which poses many challenges for government regulators; inefficient regulation would have costly implications for the environment, human health, government budgets and the continued growth of this important global industry. Not only can different regulatory approaches and requirements in each OECD country create significant costs for the chemicals industry and for governments, they can also create barriers to trade.
If national approaches to chemical regulation are harmonised, industry is not faced with a plethora of conflicting or duplicative requirements, governments are provided with a common basis for working with each other, and non-tariff barriers to trade are reduced. The principal tools for harmonisation are a set of OECD Council Decisions which make up the OECD Mutual Acceptance of Data (MAD) system, including its OECD Guidelines for the Testing of Chemicals and OECD Principles of Good Laboratory Practice (GLP).
The chemicals industry (industrial chemicals, pharmaceuticals, pesticides, biocides, food and feed additives and cosmetics) is one of the largest industrial sectors in the world and one which poses many challenges for government regulators; inefficient regulation would have costly implications for the environment, human health, government budgets and the continued growth of this important global industry. Not only can different regulatory approaches and requirements in each OECD country create significant costs for the chemicals industry and for governments, they can also create barriers to trade.
If national approaches to chemical regulation are harmonised, industry is not faced with a plethora of conflicting or duplicative requirements, governments are provided with a common basis for working with each other, and non-tariff barriers to trade are reduced. The principal tools for harmonisation are a set of OECD Council Decisions which make up the OECD Mutual Acceptance of Data (MAD) system, including its OECD Guidelines for the Testing of Chemicals and OECD Principles of Good Laboratory Practice (GLP).
The chemicals industry (industrial chemicals, pharmaceuticals, pesticides, biocides, food and feed additives and cosmetics) is one of the largest industrial sectors in the world and one which poses many challenges for government regulators; inefficient regulation would have costly implications for the environment, human health, government budgets and the continued growth of this important global industry. Not only can different regulatory approaches and requirements in each OECD country create significant costs for the chemicals industry and for governments, they can also create barriers to trade.
If national approaches to chemical regulation are harmonised, industry is not faced with a plethora of conflicting or duplicative requirements
Evolution of Android Operating System and it’s Versionsijtsrd
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. It can be considered as a software platform as well as an operating system for mobile devices based on the Linux operating system and currently developed by Google. It is designed primarily for touch screens mobile devices such as smartphones and tablet computers. One of the most widely used mobile OS these days is android. It is free and open source software its source code is known as Android Open Source Project AOSP , which is primarily licensed under the Apache License. This Paper Contains android architecture consists of key applications, Application framework, Native libraries, Android runtime, DVM, Linux Kernal., Many versions of Android Operating System are KitKat, JellyBean, Honeycomb, Froyo etc… Advantages and Disadvantages of Android and also the conclusion. Aishwarya Gujar | Prof. Pratibha Adkar "Evolution of Android Operating System and it’s Versions" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-5 | Issue-4 , June 2021, URL: https://www.ijtsrd.compapers/ijtsrd42519.pdf Paper URL: https://www.ijtsrd.comengineering/computer-engineering/42519/evolution-of-android-operating-system-and-it’s-versions/aishwarya-gujar
Android Design Patterns in Mobile Application Development - Michalis Grigorop...Michail Grigoropoulos
Design patterns help developers and designers to solve common design problems by using tested and user friendly solutions. The term can be applied to both directions to build a thing and the thing itself. The purpose of this study is to present such solutions and examine their applicability in android application development and user experience. For the study's purposes, an application called "Messeme" was developed based on some of the design patterns that are presented in the Second section of this Thesis.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 4
Android App Development Intro at ESC SV 2012
1. Introduction to Android App Development
Opersys inc.
March 28, 2012
Opersys inc. () Introduction to Android App Development March 28, 2012 1 / 59
2. These slides are made available to you under a Creative Commons Share-Alike 3.0 license.
The full terms of this license are here: https://creativecommons.org/licenses/by-sa/3.0/
Attribution requirements and misc., PLEASE READ:
This slide must remain as-is in this specific location (slide #2), everything else you are
free to change; including the logo :-)
Use of figures in other documents must feature the below “Originals at” URL
immediately under that figure and the below copyright notice where appropriate.
You are free to fill in the space in the below “Delivered and/or customized by” section as
you see fit.
You are FORBIDEN from using the default “About me” slide as-is or any of its contents.
(C) Copyright 2010-2012, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: www.opersys.com/training/android-development
Delivered and/or customized by:
Opersys inc. () Introduction to Android App Development March 28, 2012 2 / 59
3. About me
About me
Introduced “Linux Trace Toolkit” in late ’90s
Originated Adeos and relayfs (kernel/relay.c)
Training, Custom Dev, Consulting, ...
Opersys inc. () Introduction to Android App Development March 28, 2012 3 / 59
4. About Android
About Android
Huge
Stealthy
Fast moving
Opersys inc. () Introduction to Android App Development March 28, 2012 4 / 59
5. Outline
1 What is and isn’t Android
2 Android, the numbers
3 Where does Android come from
4 App model (vs. “classic” applications)
5 User experience
6 Features
7 Internal architecture
8 SDK set up and update
9 Basic debugging tricks
Development and debugging tools
10 Alternative app marketplaces
11 App Dev Intro
12 Application Components
Activities
Services
Broadcast Receivers
Content Providers
Opersys inc. () Introduction to Android App Development March 28, 2012 5 / 59
6. Outline
13 Intents
14 Components activation and shut down
Activity
Service
Broadcast Receiver
Content Provider
15 The Manifest file
16 Processes and threads
Processes
Threads
Remote procedure calls
Thread-safe methods
17 Component Lifecycles
Activity Lifecycle
System configuration changes
Service Lifecycle
Broadcast Receiver Lifecycle
Content Provider Lifecycle
Opersys inc. () Introduction to Android App Development March 28, 2012 6 / 59
7. Outline
Processes and Lifecycles
18 UI Basics
Widgets
UI events
Menus
19 Demos ...
Opersys inc. () Introduction to Android App Development March 28, 2012 7 / 59
8. What is and isn’t Android
What is and isn’t Android
IS:
Tailored for touch-based app UX
App marketplace
Custom OS distribution
Complete and coherent app development API
Java based
Fully-integrated development suite
Very well documented development platform
Growing development community
ISN’T:
Traditional Java (SE/ME/foo or otherwise)
Traditional “application” development model
Traditional Embedded Linux system
Opersys inc. () Introduction to Android App Development March 28, 2012 8 / 59
9. Android, the numbers
Android, the numbers
Android is currently on fire
850k phone activations per day
400k apps (vs. 585k for Apple’s app store
50% total US smartphone subscribers
...
Opersys inc. () Introduction to Android App Development March 28, 2012 9 / 59
10. Where does Android come from
Where does Android come from
2002:
Sergey Brin and Larry Page started using Sidekick smartphone
Sidedick one of 1st smartphones integrating web, IM, mail, etc.
Sidedick was made by Danger inc., co-founded by Andy Rubin (CEO)
Brin/Page met Rubin at Stanf. talk he gave on Sidekick’s development
Google was default search engine on Sidekick
2004:
Despite cult following, Sidekick wasn’t making $
Danger inc. board decided to replace Rubin
Rubin left. Got seed $. Started Android inc. Started looking for VCs.
Goal: Open mobile hand-set platform
2005 - July:
Got bought by Google for undisclosed sum :)
2007 - November:
Open Handset Alliance announced along with Android
2008 - September: Android 1.0 / “Astro”
Opersys inc. () Introduction to Android App Development March 28, 2012 10 / 59
11. Where does Android come from
2009 - Feb.: Android 1.1 / “Bender”
2009 - Apr.: Android 1.5 / Cupcake
2009 - Sept.: Android 1.6 / Donut
2009 - Oct.: Android 2.0/2.1 / Eclair
2010 - May: Android 2.2 / Froyo
2010 - Dec.: Android 2.3 / Gingerbread
2011 - Jan : Android 3.0 / Honeycomb - Tablet-optimized
2011 - May : Android 3.1
2011 - Nov : Android 4.0 / Ice-Cream Sandwich - merge of
Gingerbread and Honeycomb
Opersys inc. () Introduction to Android App Development March 28, 2012 11 / 59
12. App model (vs. “classic” applications)
App model (vs. “classic” applications)
No single entry point (No main() !?!?)
Unlike Windows or Unix API/semantics in many ways
Processes and apps will be killed at random: developer must code
accordingly
UI disintermediated from app “brains”
Apps are isolated, very
Behavior predicated on low-memory conditions
Opersys inc. () Introduction to Android App Development March 28, 2012 12 / 59
14. Features
Features - as advertized by Google
Application framework enabling reuse and replacement of components
Dalvik virtual machine optimized for mobile devices
Integrated browser based on the open source WebKit engine
Optimized graphics powered by a custom 2D graphics library; 3D
graphics based on the OpenGL ES 1.0 specification (hardware
acceleration optional)
SQLite for structured data storage
Media support for common audio, video, and still image formats
(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
GSM Telephony (hardware dependent)
Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
Camera, GPS, compass, and accelerometer (hardware dependent)
Rich development environment including a device emulator, tools for
debugging, memory and performance profiling, and a plugin for the
Eclipse IDE
Opersys inc. () Introduction to Android App Development March 28, 2012 14 / 59
17. SDK set up and update
SDK set up and update
What’s in the SDK?
Android-specific tools
Eclipse plugin
QEMU-based emulator
Getting the SDK
http://developer.android.com/sdk/index.html
Prerequisites:
Windows, Mac or Linux
Eclipse 3.4 or later - (highly recommended)
JDK 5 or 6 (gcj won’t do)
Opersys inc. () Introduction to Android App Development March 28, 2012 17 / 59
18. SDK set up and update
SDK set up and update
1 Make sure prerequisites are installed
2 Install SDK
3 Install ADT plugin for Eclipse
4 Use “Android SDK and AVD Manager” (android cli tool) to install
platform support
Opersys inc. () Introduction to Android App Development March 28, 2012 18 / 59
19. Basic debugging tricks
Basic debugging tricks
Logging - Use LogCat to view (either using ’adb logcat’ or Ecplise):
import android.util.Log;
...
Log.d(DTAG, "onConfigurationChanged() called");
Log output:
D/PhoneApp( 229): updateProximitySensorMode: state = IDLE
D/PhoneApp( 229): updateProximitySensorMode: lock already released.
W/dalvikvm( 824): threadid=1: thread exiting with uncaught exception (group=0
E/AndroidRuntime( 824): FATAL EXCEPTION: main
Toast messages - show up device UI:
import android.widget.Toast;
...
Toast.makeText(this, "onConfigurationChanged()", Toast.LENGTH_SHORT).show();
Opersys inc. () Introduction to Android App Development March 28, 2012 19 / 59
20. Basic debugging tricks Development and debugging tools
Development and debugging tools
android - manage AVDs and SDK components
apkbuilder - creating .apk packages
dx - converting .jar to .dex
adb - debug bridge
ddms - Dalvik debug monitor
monkey - test UI randomly
traceview - view app’s execution logs
logcat - view system logs
...
Opersys inc. () Introduction to Android App Development March 28, 2012 20 / 59
21. Alternative app marketplaces
Alternative app marketplaces
App-manager has to be root to install apps
User can circumvent by allowing install from “Unknown sources” :(
Manufacturer and/or carrier can factory-install other “market”
Amazon
B&N NOOK Apps
Verizon V Cast
F-Droid: FOSS app backend
Opersys inc. () Introduction to Android App Development March 28, 2012 21 / 59
22. App Dev Intro
App Dev Intro
All app contents packaged into .apk:
Compiled Java
Resources
Data
Native code
etc.
.apk generated by aapttool
.apk is what is downloaded by users to their device
1 apk = 1 app
Opersys inc. () Introduction to Android App Development March 28, 2012 22 / 59
23. App Dev Intro
Apps live in isolated worlds:
Each App is assigned its own UID:
Separate permissions (ex: /home/foo vs. /home/bar)
No files shared
Every App is its own separate Linux process:
Process startup/shutdown is automagic/on-demand
No single point of failure
Each process has its own Dalvik VM:
No inter-app code interference
No direct cross-app calls
Exceptions:
Can arrange for 2 apps = 1 UID (shared files)
Can arrange for 2 apps of 1 UID = 1 Process
Opersys inc. () Introduction to Android App Development March 28, 2012 23 / 59
24. Application Components
Application Components
1 App = N Components
Apps can use components of other applications
App processes are automagically started whenever any part is needed
Ergo: N entry points, !1, and !main()
Components:
Activities
Services
Broadcast Receivers
Content Providers
Opersys inc. () Introduction to Android App Development March 28, 2012 24 / 59
25. Application Components Activities
Activities
Visual interface for a single user interaction
Activities are independent from one another
public class Foo extends Activity { ... }
1 Activity = 1 default window, usually full-screen
Visual content = hierarchy of views (Viewclass ):
ex.: containers, buttons, scroll bars, etc.
Activity.setContentView() = set root Viewclass
Opersys inc. () Introduction to Android App Development March 28, 2012 25 / 59
26. Application Components Services
Services
Background service
Runs indefinitely
Talk to service = bind to it
public class Foo extends Service { ... }
Runs in main app process
Ergo: use accept()/fork() semantics
Remote calls run on thread pool
Opersys inc. () Introduction to Android App Development March 28, 2012 26 / 59
27. Application Components Broadcast Receivers
Broadcast Receivers
Receive and react to broadcast announcement
Usually system event:
Ex.: low bat, new pic, timezone change
Apps can also initiate broadcasts
public class Foo extends BroadcastReceiver { ... }
1 App can have N Broadcast Receivers
No UI, but can start Activity or send Notifications
Opersys inc. () Introduction to Android App Development March 28, 2012 27 / 59
28. Application Components Content Providers
Content Providers
Makes data available to other apps
Data can be stored in FS or SQLite
public class Foo extends ContentProvider { ... }
Apps use ContentResolverobject to talk to Content Provider
All IPC is transparent when using ContentResolverobject
Opersys inc. () Introduction to Android App Development March 28, 2012 28 / 59
29. Intents
Intents
Intent = asynchronous message w/ or w/o designated target
Like a polymorphic Unix signal, but w/o required target
Intents ”payload” held in Intentobject
Intent Filters specified in Manifest file
Opersys inc. () Introduction to Android App Development March 28, 2012 29 / 59
30. Components activation and shut down
Components activation and shut down
Activity
Service
Content Provider
Opersys inc. () Introduction to Android App Development March 28, 2012 30 / 59
31. Components activation and shut down Activity
Activity
Activated through passing Intent to:
Context.startActivity()
Activity.startActivityForResult()
Activity’s onCreate() doesn’t provide the Intent
Use getIntent() to look at initial Intent
Subsequent Intents sent to onNewIntent() callback
Intent results sent to onActivityResult() callback
Shut down:
Self: finish()
Other Activity started w/ startActivityForResult(): finishActivity()
System
Opersys inc. () Introduction to Android App Development March 28, 2012 31 / 59
32. Components activation and shut down Service
Service
Activated through:
Passing Intent to Context.startService()
Call to Context.bindService()
Both generate an onCreate() callback
Context.startService() generates onStart() callback:
Takes Intent as parameter
Context.bindService() generates onBind() callback:
Use RPC thereafter
Shut down:
Self: stopSelf()
Other Component: Context.stopService()
System
Opersys inc. () Introduction to Android App Development March 28, 2012 32 / 59
33. Components activation and shut down Broadcast Receiver
Broadcast Receiver
Send Intent through:
Context.sendBroadcast()
Context.sendOrderedBroadcast()
Context.sendStickyBroadcast()
Trigger onReceive() callback
Active while it’s responding to broadcast message
Can be shut down by system
Opersys inc. () Introduction to Android App Development March 28, 2012 33 / 59
34. Components activation and shut down Content Provider
Content Provider
Activated through request from ContentResolver
Active while it’s responding to ContentResolver request
Can be shut down by system
Opersys inc. () Introduction to Android App Development March 28, 2012 34 / 59
35. The Manifest file
The Manifest file
Informs system about app’s components
XML format
Always called AndroidManifest.xml
Activity = <activity> ... static
Service = <service> ... static
Broadcast Receiver:
Static = <receiver>
Dynamic = Context.registerReceiver()
Content Provider = <provider> ... static
Opersys inc. () Introduction to Android App Development March 28, 2012 35 / 59
36. The Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="com.example.project.FreneticAc
android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel"
. . . >
</activity>
. . .
</application>
</manifest>
Opersys inc. () Introduction to Android App Development March 28, 2012 36 / 59
37. The Manifest file
Two types of Intents:
w/ explicitly named targets
w/o explicitly named targets
When no target is named, system uses Filters to locate best fit
If Intent isn’t named in Filter, activation only on explicit naming
Intent Filter for Launcher icon Activity:
action: android.intent.action.MAIN
category: android.intent.category.LAUNCHER
Opersys inc. () Introduction to Android App Development March 28, 2012 37 / 59
39. Processes and threads
Processes and threads
1st time Components need to run: System starts Linux process
Default: all Components of an app run in single process thread
Defaults can be overriden:
Run Components in other processes
Spawn additional threads for any process
Opersys inc. () Introduction to Android App Development March 28, 2012 39 / 59
40. Processes and threads Processes
Processes
Default: all callbacks to any app Component are issued to the main
process thread
<activity>—<service>—<recipient>—<provider> have
processattribute to override default:
String name of process (default: same as app package name)
If starts w/ ”:”, process ”private” to app is created for Component
If starts w/ lowercase, Component runs in global process of that name
if permissions allow
Do NOT perform blocking/long operations in main process thread:
Spawn threads instead
Process termination/restart is at system’s discretion
Therefore:
Must manage Component Lifecycle
Opersys inc. () Introduction to Android App Development March 28, 2012 40 / 59
41. Processes and threads Threads
Threads
Create using the regular Java Threadobject
Android API provides thread helper classes:
Looper: for running a message loop with a thread
Handler: for processing messages
HandlerThread: for setting up a thread with a message loop
Opersys inc. () Introduction to Android App Development March 28, 2012 41 / 59
42. Processes and threads Remote procedure calls
Remote procedure calls
Android RPCs = Binder mechanism
Binder is a low-level functionality, not used as-is
Instead: must define interface using Interface Definition Language
(IDL)
IDL fed to aidltool to generate Java interface definitions
Opersys inc. () Introduction to Android App Development March 28, 2012 42 / 59
43. Processes and threads Remote procedure calls
Opersys inc. () Introduction to Android App Development March 28, 2012 43 / 59
44. Processes and threads Remote procedure calls
Code generated by aidltool takes care of all IPC details
Typically, the invoked party is a Service
Client:
Implements onServiceConnected() callback, receives IBinder object
Implements onServiceDisconnected() callback
Calls bindService() to connect to Service
Service:
Subclasses aidltool -generated Stub to implement interface
onBind() callback decides whether or not to accept connection based
on Intent
onBind() returns instance of Stub subclass
All RPC calls are synchronous
Opersys inc. () Introduction to Android App Development March 28, 2012 44 / 59
45. Processes and threads Thread-safe methods
Thread-safe methods
Remote callbacks don’t run in Component’s process main thread
Remote callbacks run from a thread pool:
Methods exposed by an IBinder Stub subclass
ContentProvider methods (query(), insert(), delete(), update(),
getType())
Since many clients can call the same methods: methods exposed
remotely must be thread safe:
’synchronized’ keyword
java.lang.Thread
java.util.concurrent*
...
Opersys inc. () Introduction to Android App Development March 28, 2012 45 / 59
46. Component Lifecycles
Component Lifecycles
System automagically starts/stops/kills processes
System triggers Lifecycle callbacks when relevant
Ergo: Must manage Component Lifecycle
Some Components are more complex to manage than others
Opersys inc. () Introduction to Android App Development March 28, 2012 46 / 59
47. Component Lifecycles Activity Lifecycle
Activity Lifecycle
Activity’s states:
Resumed (running): top of Task’s Activity stack
Paused: lost focus but still visible
Stopped: completely hidden to user
Paused or stopped Activities are garbage-collectable
Opersys inc. () Introduction to Android App Development March 28, 2012 47 / 59
48. Component Lifecycles Activity Lifecycle
Opersys inc. () Introduction to Android App Development March 28, 2012 48 / 59
49. Component Lifecycles Activity Lifecycle
System configuration changes
If config changes, system will stop and restart Activity w/ new
resources
Screen orientation change = config change
Either let system restart Activity and save/restore its state:
Bundle, for small amounts of data
Object, for large/non-trivial data (sockets, bitmaps, etc.)
Or handle the config change yourself
Opersys inc. () Introduction to Android App Development March 28, 2012 49 / 59
50. Component Lifecycles Service Lifecycle
Service Lifecycle
Core callbacks:
onCreate()
onDestroy()
Ways to operate a Service (not mutually exclusive):
Start/stop the service
Bind/unbind to the Service
Opersys inc. () Introduction to Android App Development March 28, 2012 50 / 59
51. Component Lifecycles Service Lifecycle
Opersys inc. () Introduction to Android App Development March 28, 2012 51 / 59
52. Component Lifecycles Broadcast Receiver Lifecycle
Broadcast Receiver Lifecycle
Only has onReceive()
Considered active only while servicing this call
Encompassing process ”protected” while Broadcast Receiver active
Should do minimal work and return
Should start service for long-running work
Opersys inc. () Introduction to Android App Development March 28, 2012 52 / 59
53. Component Lifecycles Content Provider Lifecycle
Content Provider Lifecycle
Only has onCreate()
Implement Content Provider REST-like callbacks:
query(Uri, String[], String, String[], String)
insert(Uri, ContentValues)
update(Uri, ContentValues, String, String[])
delete(Uri, String, String[])
getType(Uri) returns Content Provider data MIME type
Opersys inc. () Introduction to Android App Development March 28, 2012 53 / 59
54. Component Lifecycles Processes and Lifecycles
Processes and Lifecycles
Android’s process management is predicated on low-memory:
Processes are started and remain active as long as RAM is available
When RAM is low, system starts ”garbage collecting”
Processes of lower importance are killed to free up space
System continously maintains an active Components ”importance
hierarchy”
System tries to provide ”priority inheritance”
Hierarchy:
1 Foreground process - killed as a last resort
2 Visible process
3 Service process
4 Background process
5 Empty process
Opersys inc. () Introduction to Android App Development March 28, 2012 54 / 59
55. UI Basics
UI Basics
UI is built on top of Viewobject and ViewGroupobject
Viewclass is root for subclassed ”widgets” (text fields, buttons, etc.)
ViewGroupclass is root for subclassed ”layouts”
Viewobject = rectangle on screen. Handled by object for rectangle:
Measurement
Layout
Drawing
Focus change
Scrolling
Key/gesture interactions
Opersys inc. () Introduction to Android App Development March 28, 2012 55 / 59
56. UI Basics Widgets
Widgets
Widget = Viewobject w/ specific UI:
Buttons
Checkboxes
Text-entry field
Date picker
Clock
Zoom controls
See android.widgetpackage
You can create custom widgets
Opersys inc. () Introduction to Android App Development March 28, 2012 56 / 59
57. UI Basics UI events
UI events
To get events:
Define and register event listener, or
Override existing one of widget’s callbacks
Event listener:
Most common case
Viewclass contains collections of nested interfaces w/ callbacks
Must implement interface/callback and register it to Viewobject
Generic form:
On*Listenerinterface & On*() callback; View.setOn*Listener()
Opersys inc. () Introduction to Android App Development March 28, 2012 57 / 59
58. UI Basics Menus
Menus
Types:
Main app menu view through the MENU key
Contextual menus
Menus are Viewobject hierarchies too
However:
Hierarchy is automatically created by system, not you
No need to register event listeners
Instead, implement callbacks for:
Populating menu:
onCreateOptionsMenu()
onCreateContextMenu()
Handling menu selection:
onOptionsItemSelected()
onContextItemSelected()
Opersys inc. () Introduction to Android App Development March 28, 2012 58 / 59
59. Demos ...
Demos ...
Opersys inc. () Introduction to Android App Development March 28, 2012 59 / 59