Overview Of CS 282 & Android - Vanderbilt University

3y ago
43 Views
2 Downloads
1.55 MB
54 Pages
Last View : 22d ago
Last Download : 3m ago
Upload by : Lilly Andre
Transcription

Overview of CS 282 & AndroidDouglas C. edu/ schmidtInstitute for SoftwareIntegrated SystemsVanderbilt UniversityNashville, Tennessee, USACS 282 Principles of Operating Systems IISystems Programming for Android

Overview of CS 282 and AndroidD. C. SchmidtTopics Covered in this Part of the Module Course goals & logistics2

Overview of CS 282 and AndroidD. C. SchmidtTopics Covered in this Part of the Module Course goals & logistics Present an overview of theAndroid software architecture3

Overview of CS 282 and AndroidD. C. SchmidtCourse Goals Learn about Mobile devices Systems programming formobile devices The Android platform Develop interesting Androidsystems programmingapplications Expect lots of programming Each student will do multipleprojects There may also be a group projectat the end4

Overview of CS 282 and AndroidD. C. SchmidtAdministrivia5

Overview of CS 282 and AndroidD. C. SchmidtLogistics Douglas C. Schmidt d.schmidt@vanderbilt.edu Office: FGH #226 Office hours: M. 1-3pm & W. 1-3pm Nearly always reachable by email TAs/graders Nick King nicholas.b.king@vanderbilt.edu Nolan Smith nolan.m.smith@vanderbilt.edu Lane Kelly lane.m.kelly@vanderbilt.edu Course URL: www.dre.vanderbilt.edu/ schmidt/cs2826

Overview of CS 282 and AndroidD. C. SchmidtCourse Work There will be 5-6 programmingassignments written in Java Can use Windows, Linux, Mac, etc. Must be done individually Programs will be graded as follows: 40% execution correctness 30% structure (e.g., modularization,information hiding, etc.) 10% insightful programming (e.g.,developing reusable classcomponents, etc.) 10% Consistent style (e.g.,capitalization, indenting, etc.) 10% appropriate commenting style77

Overview of CS 282 and AndroidD. C. SchmidtCourse Work There will be a 5 point deduction(out of a possible 100 points) foreach day that your program is late Programs turned in later thantwo calendar days after the duedate will receive a zero There will be weekly quizzes & acomprehensive final exam The relative weighting of eachportion of the course is : 40% Programming projects 40% Quizzes 10% Final Exam 10% Class participation88

Overview of CS 282 and AndroidD. C. SchmidtGround Rules Assignments must be submitted on time Work must be your own (see code.cfm) No laptops open in class unless explicitlyallowed You will be called upon to answer questions 10% class participation grade, so beinvolved & attend class You’ll get out of this course what you put into it, so be prepared to workhard & learn a lot Be prepared for weekly quizzes & occasional guest lectures Make sure to avail yourself of available help, e.g., office hours, TAs,mailing list, etc.99

Overview of CS 282 and AndroidD. C. SchmidtClass Organization Mix of lecture & programmingexercises ½ presentation ½ laboratory exercises & semesterproject Organization will remain flexible Will change as needed10

Overview of CS 282 and AndroidD. C. SchmidtWhy Mobile Devices& Android?11

Overview of CS 282 and AndroidD. C. SchmidtMobile Devices are the Next Computing Platform12

Overview of CS 282 and AndroidD. C. SchmidtWhy Android? Android has 50% ofthe smartphone market(#1) iPhone has 30% ofthe smartphone market(#2) Blackberry, WindowsMobile, & etc. arerapidly losing marketshare since theirplatforms not nearly asinteresting to developfor as Android/iPhone13

Overview of CS 282 and AndroidD. C. SchmidtWhy Android?Android is: the fastest growing smartphoneplatform open-source & works onmultiple platforms no need to own a Mac no need to join a developerprogram Easy to learn for Java (& C )programmers Much easier to transition to thanObjective-C14

Overview of CS 282 and AndroidD. C. SchmidtGetting Startedwith Android15

Overview of CS 282 and AndroidD. C. SchmidtDeveloping Android Apps Android is a software stack for mobile devices that provides an operatingsystem, middleware, & key services/applications The Android SDK contains libraries &development tools for creating applications16

Overview of CS 282 and AndroidD. C. SchmidtDeveloping Android Apps Android is a software stack for mobile devices that provides an operatingsystem, middleware, & key services/applications Android uses the Eclipse IntegratedDevelopment Environment (IDE)17

Overview of CS 282 and AndroidD. C. SchmidtDeveloping Android Apps Android is a software stack for mobile devices that provides an operatingsystem, middleware, & key services/applications Android uses the Eclipse IntegratedDevelopment Environment (IDE) Android Eclipse Plugins provide: wizards for creating new apps a visual editor for creating GUIs editors for manipulating AndroidXML descriptors needed for yourapp an emulator for testing yourapps on your PC a debugger for finding errorsin the emulator or on a device18

Overview of CS 282 and AndroidD. C. SchmidtDeveloping Android Apps Android is a software stack for mobile devices that provides an operatingsystem, middleware, & key services/applications The Android SDK contains libraries &development tools for creating applications Android uses the Eclipse IntegratedDevelopment Environment (IDE) Android Eclipse Plugins provide: wizards for creating new apps a visual editor for creating GUIs editors for manipulating Android XMLdescriptors needed for your app an emulator for testing your apps onyour PC a debugger for finding errors in theemulator or on a device19

Overview of CS 282 and AndroidD. C. SchmidtSetting Up an Android Development Environment Follow the instructions for Lab1 athttp://www.dre.vanderbilt.edu/ schmidt/cs282/Lab1.pdf20

Overview of CS 282 and AndroidD. C. SchmidtFiguring Out Android Android is well documented The Android javadoc references will be criticalreference material for your projects: ml The Android developer guide is another importantresource: http://developer.android.com/guide/components We recommend “The Busy Coder’s Guide toAndroid Development” e-book http://commonsware.com/warescription21

Overview of CS 282 and AndroidD. C. SchmidtOverview ofAndroid22

Overview of CS 282 and AndroidD. C. SchmidtWhat is Android?C Android provides a layered software stack for mobile devices, including A variant of the Linux OS optimized for power conservation & local IPC23

Overview of CS 282 and AndroidD. C. SchmidtWhat is Android?CC /C Android provides a layered software stack for mobile devices, including A variant of the Linux OS optimized for power conservation & local IPC An optimized Java Virtual Machine (Dalvik), a subset of Java librariesrunning on Dalvik, native C/C libraries, & a hardware abstraction layer24

Overview of CS 282 and AndroidD. C. SchmidtWhat is Android?CC /C Java/JNI Android provides a layered software stack for mobile devices, including A variant of the Linux OS optimized for power conservation & local IPC An optimized Java Virtual Machine (Dalvik), a subset of Java librariesrunning on Dalvik, native C/C libraries, & a hardware abstraction layer Middleware, including GUIs Telephony services Camera Multimedia App frameworks App Distribution etc.25

Overview of CS 282 and AndroidD. C. SchmidtWhat is Android?CC /CJava/JNI Android provides a layered software stack for mobile devices, including A variant of the Linux OS optimized for power conservation & local IPC An optimized Java Virtual Machine (Dalvik), a subset of Java librariesrunning on Dalvik, native C/C libraries, & a hardware abstraction layer Middleware, including GUIs Telephony services Camera Multimedia App frameworks App Distribution etc. Common set ofapps26See .htmlfor more

Overview of CS 282 and AndroidD. C. SchmidtCLinux Kernel Provides infrastructure mechanismsto manage mobile device resources Memory, process, & threadmanagement Network & inter-processcommunication stack Device driver framework Security27

Overview of CS 282 and AndroidD. C. SchmidtCLinux Kernel Provides infrastructure mechanismsto manage mobile device resources Memory, process, & threadmanagement Network & inter-processcommunication stack Device driver framework Security Android-specific enhancements Binder – optimized inter process communication (IPC)Android shared memoryPower managementAlarm driverLow memory killerKernel debugger & Logger28en.wikipedia.org/wiki/Android (operating system)#Linuxhas more info

Overview of CS 282 and AndroidD. C. SchmidtC /CHardware Abstraction Layer (HAL) User space C/C library layerthat defines the interfaceAndroid requires hardware“drivers” to implement The HAL helps to decouple Android platform logic fromhardware interface Android frameworks fromLinux kernel29

Overview of CS 282 and AndroidD. C. SchmidtC /CHardware Abstraction Layer (HAL) User space C/C library layerthat defines the interfaceAndroid requires hardware“drivers” to implement The HAL helps to decouple Android platform logic fromhardware interface Android frameworks fromLinux kernel Motivation for a user-space HAL Not all components have standardizedkernel driver interfaces Android has specific requirements forhardware drivers Kernel drivers are GPL, which exposesproprietary intellectual property ofAndroid Implementations of HAL componentsare often not open-source30See 12 02 final.pdf

Overview of CS 282 and AndroidD. C. SchmidtC /CNative C/C Libraries System C library bionic libc Surface Manager display management Media Framework audio/video streaming FreeType library for rendering fonts Webkit web browser engine OpenGL ES, SGL graphics engines SQLite relational database engine SSL secure sockets layer31

Overview of CS 282 and AndroidD. C. SchmidtC /CNative C/C Libraries System C library bionic libc Surface Manager display management Media Framework audio/video streaming FreeType library for rendering fonts Webkit web browser engine OpenGL ES, SGL graphics engines SQLite relational database engine SSL secure sockets tmlhas info on Android NDK

Overview of CS 282 and AndroidD. C. Schmidt Support services for executingapps & frameworksC/Java/JNIAndroid Runtime Dalvik Virtual Machine (VM) Android apps typically written in Java,but don’t run in a standard Java VM33

Overview of CS 282 and AndroidD. C. Schmidt Support services for executingapps & frameworksC/Java/JNIAndroid Runtime Dalvik Virtual Machine (VM) Android apps typically written in Java,but don’t run in a standard Java VM Bytecodes executed in Dalvik VM“register machine” dx program transforms java classesinto .dex-formatted bytecodes Just-in-time (JIT) compiler available34

Overview of CS 282 and AndroidD. C. Schmidt Support services for executingapps & frameworksC/Java/JNIAndroid Runtime Dalvik Virtual Machine (VM) Android apps typically written in Java,but don’t run in a standard Java VM Bytecodes executed in Dalvik VM“register machine” dx program transforms java classesinto .dex-formatted bytecodes Just-in-time (JIT) compiler now available Apps typically run in their own processes,inside their own Dalvik VM instanceBrowser AppBrowserActivitiesCore LibsDalvik VMlibC35See en.wikipedia.org/wiki/Dalvik (software)for more on Dalvik

Overview of CS 282 and AndroidD. C. Schmidt Support services for executingapps & frameworksC/Java/JNIAndroid Runtime Dalvik Virtual Machine (VM) Android apps typically written in Java,but don’t run in a standard Java VM Bytecodes executed in Dalvik VM“register machine” dx program transforms java classesinto .dex-formatted bytecodes Just-in-time (JIT) compiler now available Apps typically run in their own processes,inside their own Dalvik VM instance36 Core Libraries Core Java classes android.* java.*, javax.* junit.* org.apache.*,org.json.*, org.xml.*

Overview of CS 282 and AndroidD. C. Schmidt Support services for executingapps & frameworksC/Java/JNIAndroid Runtime Dalvik Virtual Machine (VM) Android apps typically written in Java,but don’t run in a standard Java VM Bytecodes executed in Dalvik VM“register machine” dx program transforms java classesinto .dex-formatted bytecodes Just-in-time (JIT) compiler now available Apps typically run in their own processes,inside their own Dalvik VM instance Core Libraries Core Java classes android.* java.*, javax.* junit.* org.apache.*,org.json.*, org.xml.* Doesn’t include allstandard Java SDKclasses37en.wikipedia.org/wiki/Comparison of Java and Android APIhas more info

Overview of CS 282 and AndroidD. C. SchmidtJava/JNIApplication Frameworks Provide services that are essential to the Android platform Window Manager Manages top-level window’s look &behavior View System Lists, grids, text boxes, buttons,etc. Content Providers Inter-application data sharing Activity Manager Application lifecycle & commonnavigation stack Package Manager Manages application packages Telephony Manager State of telephony services Resource Manager Manages non-code resources: strings,graphics, & layout files Location Manager Access to system location services Notification Manager Notify users when events occur38

Overview of CS 282 and AndroidD. C. SchmidtJava/JNIApplication Frameworks Provide services that are essential to the Android platform Window Manager Manages top-level window’s look &behavior View System Lists, grids, text boxes, buttons,etc. Content Providers Inter-application data sharing Activity Manager Application lifecycle & commonnavigation stack Package Manager Manages application packages Telephony Manager State of telephony services Resource Manager Manages non-code resources: strings,graphics, & layout files Location Manager Access to system location services Notification Manager Notify users when events -application-frameworkhas more info

Overview of CS 282 and AndroidD. C. SchmidtJava/JNIApplications Some standard apps include: Home main screen Contacts contacts database Calendar track schedules Camera take photos & videos Phone dial phone numbers Browser view web pages Email reader Gmail & others Media player Play songs & watchmovies SMS/MMS Instant messaging40All apps written using Java (Android frameworksuse many JNI calls to C/C )

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface1: Activity callsdownloadImage()with image URL41See www.dre.vanderbilt.edu/ schmidt/cs282for info on this app

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Can be started by creating an Intent object &passing it to startActivity() Parameters can be passed as “extras” to theIntent used to start the Service421: Activity callsdownloadImage()with image URL

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Can be started by creating an Intent object &passing it to startActivity() Parameters can be passed as “extras” to theIntent used to start the Service Apps can have multiple Activities1: Activity callsdownloadImage()with image URL43See htmlfor more info

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Service Runs in background to performlong-running operations or toaccess remote resourcesDownload Service2: Sends GET requestto web server441: Activity callsdownloadImage()with image URL

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components ActivityDownload Service Represents a single screen2: Sends GET requestto web serverwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Started Service – Oftenperforms a single operation & usuallydoesn’t return a result to the caller directly Parameters can be passed as “extras”to the Intent used to start the Service451: Activity callsdownloadImage()with image URL

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components1: Activity calls ActivityDownload ServicedownloadImage()with image URL Represents a single screen2: Sends GET requestto web serverwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Started Service – Oftenperforms a single operation & usuallydoesn’t return a result to the caller directly Parameters can be passed as “extras”to the Intent used to start the Service Bound Service – Offers a client-server interface thatallows components to interact with the Service e.g., via the Android Interface Definition Language (AIDL) & Binder RPC46See mlfor more info

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Content Provider Manages a shared set ofapplication dataDownload Service2: Sends GET requestto web server3: Stores downloadedimage in filesystem& metadata inContent ProviderImage MetadataContentProvider47ImageFiles1: Activity callsdownloadImage()with image URL

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Content Provider Manages a shared set ofapplication data Data typically storedpersistently in an SQLitedatabaseDownload Service2: Sends GET requestto web server3: Stores downloadedimage in filesystem& metadata inContent ProviderImage MetadataContentProvider48ImageFiles1: Activity callsdownloadImage()with image URL

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Content Provider Manages a shared set ofapplication data Data typically storedpersistently in an SQLitedatabase Never accessed directly,but via a Content ResolverDownload Service2: Sends GET requestto web server1: Activity callsdownloadImage()with image URL3: Stores downloadedimage in filesystem& metadata inContent ProviderImage mlhas more

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components Activity Represents a single screenwith a user interface Service Runs in background to performlong-running operations or toaccess remote resources Content Provider Manages a shared set ofapplication data Broadcast Receiver A component that respondsto system-wide Intentbroadcast announcementsDownload Service2: Sends GET requestto web server3: Stores downloadedimage in filesystem& metadata inContent Provider4. Broadcasts intentcontaining image URIImage MetadataContentProvider50ImageFiles5: Activity receivesintent & displaysimage

Overview of CS 282 and AndroidD. C. SchmidtKey Types of Android Components ActivityDownload Service Represents a single screen2: Sends GET requestto web serverwith a user interface3: Stores downloaded Serviceimage in filesystem& metadata in Runs in background to performContent Providerlong-running operations or t

Overview of CS 282 and Android D. C. Schmidt 19 Developing Android Apps Android is a software stack for mobile devices that provides an operating system, middleware, & key services/applications The Android SDK contains libraries & development tools for creating applications Android uses the Eclipse Integrated

Related Documents:

Android Studio IDE Android SDK tool Latest Android API Platform - Android 6.0 (Marshmallow) Latest Android API emulator system image - Android 6.0 Android Studio is multi-platform Windows, MAC, Linux Advanced GUI preview panel See what your app looks like in different devices Development environment Android Studio 9

ADT (Android Development Tool) bundle or ! Eclipse ADT plug-in Android SDK or ! Android studio ! Download earlier SDK versions using SDK manager if needed . Android Virtual Device (AVD) ! Android emulator allows . Android App Essentials ! Layout ! View objects: UI widgets such as buttons, text box etc. .

Android Development Tools ADT A plug-in for Eclipse (see Eclipse) to develop Android applications. Android Operating system for smartphones. Android Market The Android distribution service of mobile applications. Android Lifecycle A model Android uses to handle the lifecycle of an activity in applications.

Dial91 Android Edition User Guide 1 About Dial91 Android Edition Dial91 Android Edition is a SIP- based phone for an Android phone. With Dial91 Android Edition (Dial91), you can use the Wi-Fi internet connection on your Android phone to make and receive calls without using your mobile

ANDROID QUICK START GUIDE WELCOME TO ANDROID 1 1 Welcome to Android About Android 5.0, Lollipop Android 5.0, Lollipop is the latest version of Android, the oper-ating system that powers not just phones and tablets, but also wearables, TVs, and even cars. Android 5.0 features a bold and bright new design, 3D graphics

Navigate to https://developer.android.com/studio/index.html and download Android Studio for your appropriate OS. The Android SDK should be included with Android Studio. Make sure you do not choose an Android Studio installation that excludes the Android SDK. Standard download option for Windows OS (above). Alternative

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 - USB host support 2011 - Nov: Android 4.0 / Ice-Cream Sandwich - merge Gingerbread and Honeycomb 2012 - Jun: Android 4.1 / Jelly Bean - Platform Optimization

RP-2 ISO 14001:2015 Issued: 8/15/15 DQS Inc. Revised: 5/12/17 Introduction This Environmental Management System Assessment Checklist is a tool for understanding requirements of ISO14001:2015 “Environmental management systems – Requirements with guidance for use”. The Checklist covers Clauses 4-10 requirements with probing questions about how an organization has addressed requirements and .