mobile application development
mobile application development
• Introduction
• Android Architecture
• Versions
• Features
• OHA
• Dalvik VM
OUTLINE
• Android SDK
• Android Development Tools
• Android Virtual Devices
• Development Environment
• Directory Structure of Android Application
• Android Manifest file
INTRODUCTION
• Applications :
• Written using Java Language
– Email Client
– SMS Program
– Maps
– Browser
– Calendar
– Contacts
• Supports Parallel running
• No compulsory applications
ANDROID ARCHITECTURE
• Application Framework :
• The Application Framework layer provides many higher-level services
to applications in the form of Java classes.
• Application developers are allowed to make use of these
services in their applications.
ANDROID ARCHITECTURE
• Application Framework :
• The Android framework includes the following
key services −
• Activity Manager − Controls all aspects of
the application lifecycle and activity stack.
• Content Providers − Allows applications to
publish and share data with other
applications.
• Resource Manager − Provides access to non-
code embedded resources such as strings,
color settings and user interface layouts.
• Notifications Manager − Allows
applications to display alerts and
notifications to the user.
• View System − An extensible set of views used
ANDROID ARCHITECTURE
• Library:
• Useful to develop any third-party application.
• Native libraries are written in a language that compiles to native code
for the platform it run.
ANDROID ARCHITECTURE
• Library:
1. SQLite - Responsible for Database Operation
2. Free Type - Font Support
3. Media F/W - Audio,Video Format
4. Open GL(Open Google Library) - 2D,3D Graphics Support
5. SSL - Encrypted Communication between Client and Server
6. SGL (Scalable Graphics Libraries)- For Basic Graphics Support
ANDROID ARCHITECTURE
• Android Runtime:
• Android Runtime consists of Core Libraries and Dalvik Virtual Machine.
• Core Libraries are written in C/C++ languages. This libraries are
helpful for runtime environment. Some of the core libraries are Data
Structure, File Access, Network Access, Utilities and Graphics.
ANDROID ARCHITECTURE
• Linux Kernal:
• Linux Kernel is a Root layer of android Architecture which is responsible
for device drivers(display, camera, Bluetooth, flash, web driver, usb,
keypad,wifi etc.)
• power management, memory management and resource
management.
ANDROID ARCHITECTURE (HOW ANDROID WORKS)
VERSIONS
Features:
• Google Maps.
• Camera.
• Gmail, Contacts, and Google
Synchronization.
• Web Browser.
• Wireless supports – Wi-Fi and
Bluetooth.
BETA 1.1(FEBRUARY 9, 2009)
Features:
• New upload service on YouTube and Picasa
like Uploading Videos and Photos.
• Supporting in MPEG-4, Video recording.
• Improving Web Browser-Copy and Paste
facility.
ANDROID VERSION 1.6: DONUT SEPTEMBER
15, 2009
Features:
• The main enhancement was a Power Control
widget for managing Wi-Fi, Bluetooth, GPS,
etc.
• Provided Gallery and Camera features with
quick toggling features.
• Improve the speed in system apps.
• Introduction of the Quick Search Box.
ANDROID VERSIONS 2.0 TO 2.1: ÉCLAIR
DECEMBER 3, 2009
Features:
• Update UI.
• Support Live Wallpaper.
• Support Bluetooth 2.1.
• Improve Google map.
• Minor API Changes.
ANDROID VERSION 2.2: FROYO MAY 20, 2010
Features:
• Support for Animated GIF.
• Wi-Fi Support Hotspot
functionality.
• Speed improvements.
• Upload file support in the
browser.
• Support numeric and
alphanumeric passwords.
ANDROID VERSION 2.3: GINGERBREAD
DECEMBER 6 2010
Features:
• Improve Copy-Paste Facility.
• Updated UI design.
• VP8 and WebM video format support.
• Social Networking Supports.
• Easy use of the keyboard.
• Multiple camera support (usually
known as a selfie camera nowadays).
ANDROID 3.0/3.1/3.2 – HONEYCOMB
Features:
• Gmail App improvements.
• Updated 3D UI.
• Supports multiprocessors and
hardware acceleration for
graphics.
• Media Sync from SD Card.
• Google eBooks.
• Google Talk Video Chat.
• Support Adobe Flash in Browser.
• High-performance Wi-Fi
Connections and Lock.
• Chinese handwriting.
ANDROID VERSION 4.0: ICE CREAM SANDWICH
OCTOBER 19, 2011
Features:
• Improved text input and spelling
check.
• Wi-Fi direct (Sharing information
using NFC).
• Photo Decor facility.
• Improved keyboard correction.
• Unlocking with face-fixing.
• Improved video recording
resolution.
• Camera performance.
• Up to 16 tabs in the web browser.
ANDROID VERSIONS 4.1 TO 4.3: JELLY BEAN
Features:
• Voice search.
• Panorama.
• Daydream as a screensaver.
• Power control.
• Improve camera application.
• Security enhancement.
• Voice typing.
• Multiple user accounts on tablets only.
• 4k resolution support.
• Supporting Bluetooth Low Energy.
• Bi-directional text and other language support.
• Support USB audio.
• Set the volume of incoming calls and show
a message alert.
• Native emoji support.
ANDROID VERSION 4.4: KITKAT SEPTEMBER 3,
2013.
Features:
• Screen Recording.
• KitKat adds a feature in ‘Google
now’. Its name is ‘OK Google’. “OK,
Google” allows access to Google to
the users without touching your
mobile phone.
• GPS Support.
• Offline music support.
• UI updates for google map
navigation and alarm.
• Introduction of ‘Emoji’ to the
google keyboard.
ANDROID VERSIONS 5.0 AND 5.1: LOLLIPOP
NOVEMBER 12, 2014
Features:
• Support ART( Android
Runtime).
• Improvement in UI.
• New material design.
• Notifications on the Lock
screen.
• Revamped navigation bar.
• Multiple sim card support.
• High definition voice call.
ANDROID VERSION 6.0: MARSHMALLOW
Features:
• Fingerprint
authentication to unlock
the screen.
• USB Type C support.
• Multi-window
experiments (user can
use two different apps
in one screen).
• Save battery-’Sleep
Mode’.
• App permission
model-OPT(send a
request for permission).
ANDROID VERSIONS 7.0 AND 7.1: NOUGAT
MARCH 2016
Features:
• Provide multitasking.
• Inline reply to messages
and notifications so you
won’t have to open up your
Messenger application for
quick replies.
• Providing multi-window
mode.
• Improvements in
storage manager.
• Display touch
improvement.
ANDROID VERSION 8.0 AND 8.1: OREO
Features:
• Support PIP(Picture-in-Picture).
• Multi-display support.
• Google Play support.
• Adaptive icons.
• Revamped notification section(Users can
set which notifications you want to show).
ANDROID VERSION 9: PIE AUGUST 2018.
Features:
• New Gesture Navigation.
• Artificial intelligence (AI)
Compatible.
• Adaptive Battery and
Brightness.
• App Actions.
• New Screenshot Shortcuts.
• Easier Screen Rotation.
• Volume and Sound
Improvement.
• Selectable Dark Mode.
• Slices.
• Improved Security Features.
• Digital Wellbeing.
• New Accessibility Menu.
ANDROID VERSION 10: ANDROID Q
SEPTEMBER 3, 2019
Features:
• Support for the upcoming foldable
smartphones with flexible displays
which is an upcoming rush.
• System-wide dark mode.
• Navigation control over gesture.
• Smart reply for all messaging apps.
• Support for Live caption.
• Better notification control.
ANDROID VERSION 11 (DEVELOPER PREVIEW)
PREVIEW ON FEBRUARY 19 OF YEAR 2021.
• Features (announced):
– New Support for 5G.
– Privacy and Security; A new privacy choice for apps is the “Only This Time”
option when you’re allowing the app access to your location, microphone,
or camera.
– Support new screen types (pinhole and waterfall).
– Low Latency Options; adds low latency support in new MediaCodec APIs
and HDMI which is very useful for use on external displays and TVs.
FEATURES
• To install the Android SDK from within Android Studio, first start
Android Studio.
• From the Android Studio start page, select Configure > SDK
Manager.
ANDROID SDK
• If you already have Android Studio open, the SDK Manager icon is
found on the top right corner, as shown below.
ANDROID SDK
• Limitations of AVD
• Performance: Emulators can be slower compared to actual physical
devices.
• Accuracy: Testing on an emulator is not as accurate as using a real
device, especially for network and hardware-related activities.
• In summary, an AVD is a powerful tool for Android developers, allowing
them to simulate various Android devices and test their applications in
a controlled environment
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• Android Studio is the official IDE
(Integrated Development Environment)
developed by the JetBrains community
which is freely provided by Google for
android app development. After completing
the setup of Android Architecture we can
create an android application in the studio.
We need to create a new project for each
sample application and we should
understand the folder structure. It looks
like this:
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• The android project contains different types of app modules, source code files, and
resource files. We will explore all the folders and files in the android app.
1. Manifests Folder
2. Java Folder
3. res (Resources) Folder
• Drawable Folder
• Layout Folder
• Mipmap Folder
• Values Folder
4. Gradle Scripts
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• Manifests Folder
• Manifests folder contains AndroidManifest.xml for creating our
android application. This file contains information about our application
such as the Android version, metadata, states package for Kotlin file,
and other application components. It acts as an intermediator between
android OS and our application.
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• Java folder
• The Java folder contains all the java and
Kotlin source code (.java) files that we
create during the app development,
including other Test files. If we create
any new project using Kotlin, by default
the class file MainActivity.kt file will
create automatically under the package
name
“com.geeksforgeeks.myfirstkotlinapp”
as shown below.
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• Resource (res) folder
• The resource folder is the most
important folder because it
contains all the non-code
sources like images, XML
layouts, and UI strings for our
android application.
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• res/drawable folder
It contains the different types of images used for the development of
the application. We need to add all the images in a drawable folder for
the application development.
• res/layout folder
The layout folder contains all XML layout files which we used to define
the user interface of our application.
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• res/mipmap folder\
This folder contains launcher.xml files to define icons that are used to
show on the home screen. It contains different density types of icons
depending upon the size of the device such as hdpi, mdpi, xhdpi.
• res/values folder
Values folder contains a number of XML files like strings, dimensions,
colors, and style definitions.
DIRECTORY STRUCTURE OF ANDROID
APPLICATION
• Gradle Scripts folder
• Gradle means automated build system
and it contains a number of files that are
used to define a build configuration that
can be applied to all modules in our
application. In build.gradle (Project) there
are buildscripts and in build.gradle
(Module) plugins and implementations
are used to build configurations that can
be applied to all our application modules.
ANDROID MANIFEST FILE
• 1. manifest
• The main component of the
AndroidManifest.xml file is known
as manifest. Additionally, the
packaging field describes the
activity class’s package name. It
must contain an <application>
element with the xmlns:android
and package attribute specified.
ANDROID MANIFEST FILE
• 2. uses-sdk
• It is used to define a minimum and
maximum SDK version by means of an API
Level integer that must be available on a
device so that our application functions
properly, and the target SDK for which it
has been designed using a combination of
minSdkVersion, maxSdkVersion, and
targetSdkVersion attributes, respectively. It
is contained within the <manifest>
element.
ANDROID MANIFEST FILE
• 3. uses-permission
• It outlines a system permission that
must be granted by the user for the
app to function properly and is
contained within the <manifest>
element. When an application is
installed (on Android 5.1 and lower
devices or Android 6.0 and higher),
the user must grant the application
permissions.
ANDROID MANIFEST FILE
• 4. application
• A manifest can contain only one application node.
It uses attributes to specify the metadata for your
application (including its title, icon, and theme).
During development, we should include a
debuggable attribute set to true to enable
debugging, then be sure to disable it for your
release builds. The application node also acts as a
container for the Activity, Service, Content
Provider, and Broadcast Receiver nodes that
specify the application components. The name of
our custom application class can be specified
using the android:name attribute.
ANDROID MANIFEST FILE
• 5. uses-library
• It defines a shared library against
which the application must be
linked. This element instructs the
system to add the library’s code to
the package’s class loader. It is
contained within the <application>
element.
ANDROID MANIFEST FILE
• 6. activity
• The Activity sub-element of an application
refers to an activity that needs to be specified
in the AndroidManifest.xml file. It has various
characteristics, like label, name, theme,
launchMode, and others. In the manifest file,
all elements must be represented
by <activity>. Any activity that is not
declared there won’t run and won’t be visible
to the system. It is contained within the
<application> element.
ANDROID MANIFEST FILE
• 7. intent-filter
• It is the sub-element of activity that
specifies the type of intent to which the
activity, service, or broadcast receiver
can send a response. It allows the
component to receive intents of a
certain type while filtering out those
that are not useful for the component.
The intent filter must contain at least
one <action> element.
ANDROID MANIFEST FILE
• 8. action
• It adds an action for the intent-
filter. It is contained within the
<intent-filter> element.
• 9. category
• It adds a category name to an
intent-filter. It is contained
within the <intent-filter>
element.
ANDROID MANIFEST FILE
• 10. uses-configuration
• The uses-configuration components
are used to specify the combination
of input mechanisms that are
supported by our application. It is
useful for games that require
particular input controls.
ANDROID MANIFEST FILE
• 11. uses-features
• It is used to specify which hardware
features your application requires.
This will prevent our application
from being installed on a device
that does not include a required
piece of hardware such as NFC
hardware, as follows:
ANDROID MANIFEST FILE
• 12. permission
• It is used to create permissions to
restrict access to shared
application components. We can
also use the existing platform
permissions for this purpose or
define your own permissions in the
manifest.