代写 game html android Java javascript scala swift operating system database graph software network security GPU OpenGL theory Introduction to Mobile Application Development, Android Overview

Introduction to Mobile Application Development, Android Overview
(Authors: Dr Caspar Ryan, Dr Ermyas Abebe, Mr Keith Foster)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 1
Mobile Application Development
• Course Leader/Lecturer: Dr. Caspar Ryan
• Email: caspar.ryan@rmit.edu.au
• Enforced Prerequisite:
– Software Architecture: Design and
Implementation OR Advanced Programming
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 2

Course Objectives
• Understand the capabilities and limitations of a range of mobile computing devices and environments
• Understand the components of a mobile development framework and learn how and when to apply the different components to develop a working system
• Understand different types of application models/architectures used to develop mobile software applications
• Understand and apply software patterns for the development of the application models described above
* Design, implement and deploy mobile applications using an appropriate software development environment (Android)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 3
Show and Tell
• History of Mobile Platforms – Symbian
– Brew
– Windows CE/Mobile
– Java ME
– Blackberry
– iOS
– Android
– Windows Phone/Windows 10 Mobile
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 4

Value Propositions
• ‘Cool’technologyisnotenoughtoguaranteeuptake – dot-com bust
• Technologyuptakerequires:
– reduced cost of service delivery/work output, productivity
– saved time e.g. push technology (stock market updates, RSS)
– customer satisfaction
• Opportunitiesin:
– Business to consumer (B2C) – Business to business (B2B) – Business to employee (B2E)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 5
Mobile Application Domains
• Enterprise Mobility
– finance (e.g. Stock Market)
– POS (Point of Sale) or finalise sales/orders in the field
– logistics (e.g. FedEx, Amazon etc.)
– supply chain management (warehousing, inventory etc.)
• Stock checks, pick lists, orders –> just in time inventory – service technicians (online schematics etc.)
• Social and Entertainment
– Instant messaging and Communication (WhatsApp, Skype etc.) – Microblogging (Twitter etc.)
– Social Media and Networking (Facebook, Instagram etc.)
– Sports, Media, TV, Films
– Gaming (single player, online (e.g. MMO), peer to peer)
– Augmented Reality (Pokemon Go)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 6

Mobile Application Domains
• Travel and Hospitality
– maps and navigation
– ride sharing/taxi/car hire
– entertainment and dining
– travel (flights, hotels etc.)
– most services now social/review based!
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 7
Mobile Application Domains (contd.)
• Groupwareandproductivity
– email/tasks/calendar etc.
– shared document editing/viewing
– meeting scheduler (e.g. gps based)
– Communities of practice (e.g. LinkedIn)
• TheInternetof“Things”* – pervasive connectivity
– Appliances/smart homes
– sensors
– mobile and fixed computers
– big data, real time/continuous queries – crowdsourcing
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 8

Mobile Application Domains (contd.)
• Community Based
– Emergency service co-ordination (police, fire, ambulance, SES) – Health care (tele-medicine, assisted living, medical records etc.) – Virtual community/social networking
• Military/Police/Counter Terrorism – Intelligence gathering
– Field co-ordination
• Educational
– Highly interactive lectures
– Campus wide connectivity
– eBooks, podcasting, streaming etc.
• Conclusion: Mobile is increasingly pervasive
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 9
Form Factors
– PDA (iPod touch, Palm etc.)
– Smartphone (with or without physical keyboard)
– Tablet (e.g. iPad, Android Tablets (Galaxy etc.))
– Netbook (and hybrid tablet e.g. ASUS Transformer)
– Hybrid/Tablet PC (Microsoft Surface etc.)
– Laptop/Notebook/Desktop Replacement
– Wearable devices, glasses, watches, fitness bands, medical sensing etc.
– RECENT: Foldable devices (e.g. Samsung, Huawei) Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 10

Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 11
o
o o
Watches
Different durations of tasks: PC(day), tablet(hour), phone(minutes), watch(seconds), glasses ?
Data consumption versus production
Different OS/API .. e.g. Google Wear
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 12

Pervasive/Wearable Computing

Implications?
o New computing paradigms
o Distributed data and computation
o Crowdsourcing/Virtual or Community Clouds
o Privacy/Monopoly?
o Social awkwardness/distraction (only 1 in 10 would wear
glass)*
* http://www.nydailynews.com/life-style/1-10-wear-google-glass-article-1.1344844
Semester 1, 2019 COSC2309/2347 Mobile Application Development
Input Styles
– touch/gesture input (e.g. iPhone/iPad, Android)
– stylus/pen input (e.g. Microsoft Surface, Galaxy Note,
Tablet PC, PDA)
– integrated miniature keyboard (keypad or QWERTY) e.g. Blackberry
– integrated full keyboard e.g. Tablet PC, hybrid tablet
– add-on keyboards e.g. Surface Typecover, iPad dock,
Bluetooth keyboards available for most devices
– voice e.g. in-car navigation, Apple Siri, Microsoft Cortana, Google Now
– motion input e.g. accelerometer/gyroscope (Microsoft Kinect style coming soon to mobile?)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 14

Displays and Output
– line based LCD (early generation smartphone)
– graphical display
• sizes, orientations
• resolutions and colour depths
• Technologies e.g. LCD, LED, OLED, eInk etc.
• Flexible/Foldable displays e.g. Samsung/Huawei
– audio including speech e.g. in car navigation, personal assistant, accessibility
– haptic feedback e.g. vibration, deep clicks, textures
– Holographics
• e.g. virtual/projection keyboard, 3D Displays
– 3D printing!
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 15
Connectivity
• Connectivity(maybelimitedornon-existent)
– Serial/USB (charging, data transfer)
– Infrared (e.g. programmable consumer remote)
– Bluetooth/LE (I/O devices e.g. headset, joystick, fitness,
medical)
– Wi-Fi IEEE 802.11 (when available)
– GPRS, 3G, 4G+ (wide coverage networking)
– NFC (mobile payment, social apps)
– ZigBee IEEE 802.15.4 (personal area networks PAN, e.g.
home automation, body area networks)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 16

Utility
• BatteryLife
– Small devices have a limited battery life • Lasting a whole day can be critical!
• Battery/Charger Packs?!
• Apps must moderate power usage
• Simplicity
– Small devices have limited screen real estate • Achieving a simple task quickly is critical
• Utility Apps must be very focused on a single task • Intuitive UI
• Fast access to common actions
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 17
Mobile Operating Systems
• Only two main options left! – Android,iOS
• Others
– WindowsMobile..Retired,butsupportuntil2019 – Tizen (Samsung)
– Blackberry
– Linux(e.g.UbuntuTouch)
– WebOS (TVs, Consumer Devices such as Fridges) now open source – Dead: Symbian, Palm, Brew, Java ME
• Cross Platform
– HTML 5/Javascript
– PhoneGap/Apache Cordova – Microsoft Xamarin
– Dead(ish!): Flash (rebranded as Adobe Animate CC in 2016)
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 18

Mobile Operating Systems (cont.)
Android
iOS
Windows
Device Range
large
small
small
Fragmentation
Very Bad – OS versions and hardware specs
Good
Excellent – just getting started
OS
Sort of Open Source
Proprietary
Proprietary
Languages
Open source – Java, Scala, Dart, C, Kotlin, HTML-5
Open source – Swift 2.0, HTML-5
C++, .NET CF, Objective-C compatibility, Silverlight, HTML-5
Paradigm
OO (Java) Functional (Scala)
OO and Functional
OO. Potentially any .NET language
Development
Any
Mac or Hackintosh
Any
Desktop Commonality
Linux, JVM runs everywhere but slower than native
MacOS core, same or very similar frameworks
Windows NT core, shares a subset of Windows frameworks
Main Market
Business and low end consumer
High end consumer and business
Some Enterprise?
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 19
Mobile Share
• What“Share”arewetalkingabout? – Press Share
– Mind Share
– Market Share * – Profit Share
– Usage Share * – Spend Share *
* Developers want this for good ROI • iOSleadsUsage,ProfitandROI
• AndroidleadsMarketShare
• PressandMindsharehardtomeasure!
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 20

Market Share (to Q3 2018)
https://www.idc.com/promo/smartphone-market-share/vendor
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 21
User Spend Share (2012-2017)
https://www.statista.com/chart/14590/app-downloads-and-consumer-spend-by-platform/
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 22

Android Versions (October 2018)
Most Popular is Android 7.0 (Nougat, API level 24/25)*
* https://developer.android.com/about/dashboards/index.html
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 23
The Android App Market (cont.)
• Trade-off
– Aim for maximum customer coverage not the
maximum device coverage
– Lowest common denominator approach
• More non optional specialized features you add to your app…
• The less potential market you’ll have? – Paying customer approach
• Theory: The customers with money and willing to pay will have latest phones.
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 24

The Android App Market
• Games
– MostlytheBIGDEVS(e.g.AngryBirds,Pokemon!)
– But also some successful small local devs (http://www.crossyroad.com/)
• BusinessApps
– Free for Customers.
– Paid for by the business. Why? • Part of a larger product / service.
– Why Android?
• Most (international) customers have Android.
• EntrepreneurialApps – It’s a tough market!
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 25
What is Android?
• Software stack for mobile devices including OS, middleware and set of applications
• From Google and the Open Handset Alliance (a consortium of mobile operators, software companies and handset manufacturers)
• OS is based on Linux Kernel 2.6+ (4.4.1 in Android 7.0 Nougat)
• Software Stack Consists of Java Applications executing on either:
– Dalvik Virtual Machine (VM Optimized for mobile devices) using (Just In Time) JIT compilation
– Android Runtime using Ahead of Time (AOT) compilation at install time for Android 5+
– * Runtime is transparent to general developers and users
• Currently over 2.5 Million* apps (Google Play Store and third-party sites)
with high percentage free (approx. 95%!)
• Features: Multitouch, Multitasking, Connectivity (NFC, 4G, Wi-Fi, Bluetooth
etc.), Tethering, GPS, Gyroscope, Magnetometer, Accelerometer,
Fingerprint etc.
• As of version 4.0+ integrated Tablet and phone functionality.
* http://www.appbrain.com/stats/number-of-android-apps
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 26

Why Android?
Semester 1, 2019
• Free and Open Source under the Apache License (more permissive than GPL)
• Free to Develop (no developer license required or certification fees)
• Partnership with 84 firms including Software Companies, Handset manufacturers, Mobile Operators, through the Open Handset Alliance
• Secure Operating System (is based on Linux Kernel) and Robust software framework
• Leverages the power and popularity of Java and more recently supports Kotlin as an official alternative
• Free SDK and development environment (Android Studio) and formerly Eclipse
• Targets a range of devices, Feature phones, Smartphones and Tablet Devices
COSC2309/2347 Mobile Application Development Topic 1, Slide 27
Android Architecture
5 4
23
1
1 • •

OS is based on Linux Kernel (security, memory management, network, process management etc.)
multi-user system where each application has a unique user id and a separate process
Provides abstraction of
underlying hardware
2
https://developer.android.com/guide/platform/
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 28
Libraries:
C/C++ libraries which are exposed to developers through the Application framework.
Includes display subsystem (2D and 3D graphics layers), audio and video formats, database engine etc.

Android Architecture (ART/Dalvik)
5 4
23
1
3
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 29
Android Runtime: Includes MOST of the Core Libraries of the Java Programming language (SE JDK 1.5). See slide 31
ART or Dalvik Virtual Machine: Register- based VM, Optimized for mobile devices
Includes Just-In-Time Compilation (since Froyo, 2.2) or AOT (5+)
Runs java classes which have been transformed into Dalvik Executable files (.dex)
.dex file could include more than one java .class file
Each Application Runs its own instance of the ART/Dalvik VM
Android Architecture (Application)
4
5
5 4
23
1
Application Framework: Set of Java services and systems which expose system libraries to developers
run on the Dalvik VM to allow development of applications
Applications: Core Pre-installed applications such as Phone, Email, Map, Browser, Contacts etc. All written in Java
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 30

Android APIs == Java SE?
included from Java SE 5.0:
Semester 1, 2019
• Android includes most of Java SE 5.0 library specification, but not all (check Android API docs for specifics)
• Libraries are based on Apache Harmony which provides a clean- room implementation of Java SE
• Java 8 language support (lambdas etc.) with Android Studio 3.0+
• https://developer.android.com/studio /write/java8-support
• Android UI Framework is neither Swing nor AWT
• No JVM support in android
• $6BOracleVs.Googlelawsuit,Are APIs copyrightable? Still ongoing after a number of appeals!
COSC2309/2347 Mobile Application Development Topic 1, Slide 31
excluded:
Developing for Android
1) Android Studio includes: Tools and APIs for Developing in the Java Programming Language including many Emulators (see below)
• Based on IntelliJ IDEA (IDE)
• Gradle build system https://developer.android.com/studio/build/ 2) Android Developer Toolkit Plug-in for Eclipse (ADT)
or standalone bundle including eclipse.
• Deprecated (although still in use especially for complicated legacy projects!)
Emulator (Android Virtual Device AVD) for development and testing (slow startup but only need to start once, snapshots available), also Direct USB debugging on real device
Optional C/C++ native development kit (Android NDK)
Semester 1, 2019 COSC2309/2347 Mobile Application Development 32

Emulator Functions
– Simulates real device environment (runs ARM bytecode using qemu emulator or x86 using hardware acceleration HAXM)
– Fully configurable (e.g. screen sizes and resolutions, underlying hardware configurations, SD card size, CPU cores, RAM size etc.)
– Provides easy access to the default system settings common to all Android- based devices (e.g. Wireless controls, Sound and Display, Security etc.)
– Can emulate calling and SMS messaging between two emulator instances
– Can simulate location based services (using “dummy” GPS coordinates)
– Older emulators run faster, good for slow dev machines!
– Can add compatibility layers onto older versions of the Android API
– Can still be faster/more realistic to target a real device if you have one! – Enable developer options on real device
– https://developer.android.com/studio/debug/dev-options
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 33
GenyMotion Emulator
• Alleviates some of these limitations
• Free version does GPS
• running on Oracle’s VirtualBox VM
• Requires OpenGL V2.0 GPU
• Plugin for Android Studio

Homepage


Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 34

Emulator Limitations
– Limited ability to determine device state (e.g. network state, battery charge etc.)
– Limited performance (real devices usually perform better than the emulator)
– Limited support for manufacturer or operator-specific device characteristics
– Limited sensor management/support (but continues to improve!). Can integrate additional tools such as OpenIntents’ SensorSimulator that lets you simulate sensor data with the mouse in real time (covering accelerometer, compass, and temperature sensors)
– No support for Bluetooth, NFC, SD card insert/eject, Device- attached headphones, USB
– https://developer.android.com/studio/run/emulator.html
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 35
Android New Features
– CurrentlythemostpopularAndroidversionisAPI24 and 25 Nougat (Android 7.0 and 7.1)
– Wewillusethisasthedefaulttargetforthiscourse
– You can use older versions if you want to target your own
device (or newer if you are feeling adventurous!)
– Android 6 included some major new features:
https://developer.android.com/about/versions/marshmallow
/android-6.0.html
– Android 7 some more as well
– https://developer.android.com/about/versions/nougat/androi
d-7.0
– Seefollowingslidesforhighlights
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 36

Android 8 New Features
– PictureinPicture
– Enhancednotifications(NotificationDots)
– MultiDisplaySupport
– AndroidInstantApps(directinstallfrombrowser)
– GooglePlayProtect(MaliciousSoftwareDetection)
– HighperformanceAudioAPIs
– Backgroundexecutionlimits
– Andmanyothers…
– https://developer.android.com/about/versions/oreo/an droid-8.0
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 37
Android 7 New Features
– Multiwindowsupport(splitscreen,pictureinpicture etc.)
– NotificationEnhancements
– ImprovedJIT/AOTCompilation
– ImprovedDozeandBackgroundOptimization(with JobScheduler etc.)
– VulkanGraphicsAPIandOpenGLES3.2support
– ScopedDirectoryAccessandVirtualFileSupport
– https://developer.android.com/about/versions/nougat/ android-7.0
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 38

Android 6 New Features
– improved runtime permission system (* this was a big one!)
– doze mode to improve power handling (effects background
services)
– direct share allows creating targets for share menu (based on
service and activities)
– app links to register a specific external app to handle data
(register in app manifest)
https://developer.android.com/training/app-links/index.html
– voice interaction
– new notification features
– midi support (external (piano) keyboards etc.)
– adoptable external storage (treat external storage as internal ..
install apps etc.)
– improved audio, video and camera processing
– https://www.android.com/versions/marshmallow-6-0/
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 39
References
• http://developer.android.com/guide/index.html
• Joseph Annuzzi Jr., Lauren Darcey, Shane Conder, Introduction to AndroidTM
Application Development: Android Essentials, Fifth Edition, Addison-Wesley,
2015
• Joseph Annuzzi Jr., Lauren Darcey, Shane Conder, Advanced AndroidTM
Application Development, Fourth Edition, Addison-Wesley, 2014
• Shane Conder, Lauren Darcey, Carmen Delessio, Sams Teach Yourself Android
Application Development in 24 Hours, Fourth Edition, Addison-Wesley, 2015
• Ed Burnette, Hello, Android: Introducing Google’s Mobile Development
Platform (Pragmatic Programmers)
• http://www.androlib.com/appstats.aspx
• http://www.informationweek.com/news/personal-tech/smart-
phones/229401700
• http://edwinhm.blogspot.com/2008/04/android-comparisons-with-j2me.html
• http://bit.ly/jBVclE
Semester 1, 2019 COSC2309/2347 Mobile Application Development Topic 1, Slide 40