Uploaded by davidkhuu83

Week 1 - Introduction to Android

advertisement
Mobile App Development – Android
MAP524S1A
Week 1 – Introduction to Android
Dr. Razi Iqbal
razi.Iqbal@senecacollege.ca
Software and Hardware System Requirements
 The latest operating-system requirements:
http://developer.android.com/sdk/index.html#Requirements
 We develop the apps in this course using Android Studio
 https://developer.android.com/studio/
Android 11 SDK (API 30)
 The Android Software Development Kit (SDK) provides the tools
you will need to build Android apps.
 It usually gets installed with Android Studio.
Android Mobile Operating System
The Android operating system was developed by Android, Inc.,
which was acquired by Google in 2005.
In 2007, the Open Handset Alliance™ was formed to develop,
maintain and evolve Android, driving innovation in mobile
technology and improving the user experience while reducing
costs.
The first-generation Android phones were released in October
2008.
As of April 2019, Android had 74.85% of the mobile OS market
share, compared to 22.94% for iOS.
Mobile
Operating
System
Market
Share
Worldwide
Android Features
Openness and Open Source
Java
 One of the world’s most widely used programming languages
 Powerful
 Free
 Common used by millions of developers (Billions devices run Java)
Multi-touch Screen
Gestures
Built-in Apps
Packages
 Android uses a collection of packages, which are named groups of
related, predefined classes.
 Some of the packages are Android specific, some are Java specific
and some are Google specific
 These packages allow you to conveniently access Android OS
features and incorporate them into your apps.
 The Android packages help you create apps that adhere to Android’s
unique look-and-feel conventions and style guidelines
http://developer.android.com/reference/packages.html
Android Studio
Android Studio was announced at the Google I/O developer
conference in 2013 and is now Google’s preferred Android
IDE.
Android Studio is based on the JetBrains IntelliJ IDEA Java
IDE
The Android Emulator
The Android emulator, included in the Android SDK, allows
you to run Android apps in a simulated environment within
Windows, Mac OS X or Linux, without using an actual Android
device.
The emulator displays a realistic Android user-interface
window.
It’s particularly useful if you do not have access to Android
devices for testing.
You should certainly test your apps on a variety of Android
devices before uploading them to Google Play.
Android Virtual Device (AVD)
 Before running an app in the emulator, you’ll need to create an
Android Virtual Device (AVD), which defines the
characteristics of the device on which you want to test,
including the hardware, system image, screen size, data storage
and more.
 Emulator will also give you flexibility of testing your app on
various emulator devices.
AVD (Cont.)
You can reproduce on the emulator most of the Android
gestures and controls using your computer’s keyboard and
mouse.
The gestures on the emulator are a bit limited, since your
computer probably cannot simulate all the Android hardware
features.
For example, to test GPS apps in the emulator, you’ll need to
create files that simulate GPS readings.
Android Gestures on the Emulator
Gesture
Emulator action
Touch
Double touch
Long press
Drag
Click the mouse once.
Double click the mouse.
Click and hold the mouse. Introduced in Twitter® Searches app.
Click, hold and drag the mouse. Introduced in Cannon Game app.
Click and hold the mouse, move the pointer in the swipe direction
and release the mouse. Introduced in Weather Viewer app.
Press and hold the Ctrl (Control) key. Two circles that simulate the
two touches will appear. Move the circles to the start position,
click and hold the mouse and drag the circles to the end position.
Swipe
Pinch zoom
Android Hardware Controls in the Emulator
Control
Back
Call/dial button
Camera
End call button
Home
Menu (left softkey)
Emulator action
Esc
F3
Ctrl-KEYPAD_5, Ctrl-F3
F4
Home button
F2 or Page Up button
Android Hardware Controls in the Emulator (Cont.)
Control
Power button
Search
* (right softkey)
Rotate to previous orientation
Rotate to next orientation
Toggle cell networking on/off
Volume up button
Volume down button
Emulator action
F7
F5
Shift-F2 or Page Down button
KEYPAD_7, Ctrl-F11
KEYPAD_9, Ctrl-F12
F8
KEYPAD_PLUS, Ctrl-F5
KEYPAD_MINUS, Ctrl-F6
Installing Android Studio
 Please follow instructions below on how to install Android
Studio on your local machine:
https://developer.android.com/studio/install
Creating Android Virtual Device
 Please follow instructions below on how to create an Android
Virtual Device sometimes also called an Emulator
https://developer.android.com/studio/run/managing-avds
First Android App!
Lets create our first Android App.
Related documents
Download