Android Report Vibhav
Android Report Vibhav
Seminar
Report
Submitted by
Vibhav Bhardwaj
Invertis University
1
Contents
1. Introduction……………………………………………….. 1-4
2. History of technology …………………..………………... 5-6
3. Method, approach, tools related technology ……………... 6-17
4. Applications ………………………………………………. 18
5. References ……………………………………………….... 19
2
Introduction to Android
What is Android?
As the world's most popular mobile platform, Android powers hundreds of millions
of mobile devices in more than 190 countries around the world. It has the largest
installed base of any mobile platform and is still growing fast. Every day another
million users power up their Android devices for the first time and start looking for
apps, games, and other digital
.
Best experience for app users
Android provides a touch-screen user interface (UI) for interacting with apps.
Android's user interface is mainly based on direct manipulation, using touch
gestures such as swiping, tapping and pinching to manipulate on-screen objects. In
addition to the keyboard, there’s a customizable virtual keyboard for text input.
Android can also support game controllers and full-size physical keyboards
connected by Bluetooth or USB.
3
The Android home screen can contain several pages of app icons, which launch the
associated apps, and widgets, which display live, auto-updating content such as the
weather, the user's email inbox or a news ticker. Android can also play multimedia
content such as music, animation, and video. The figure above shows app icons on
the home screen (left), playing music (center), and displaying widgets (right).
Along the top of the screen is a status bar, showing information about the device
and its connectivity. The Android home screen may be made up of several pages,
between which the user can swipe back and forth.
Android is designed to provide immediate response to user input. Besides a fluid
touch interface, the vibration capabilities of an Android device can provide haptic
feedback. Internal hardware such as accelerometers, gyroscopes and proximity
sensors, are used by many apps to respond to additional user actions. These sensors
can detect rotation of the screen from portrait to landscape for a wider view or it
can allow the user to steer a virtual vehicle in a racing game by rotating the device
as if it were a steering wheel.
The Android platform, based on the Linux kernel, is designed primarily for
touchscreen mobile devices such as smartphones and tablets. Since Android
devices are usually battery-powered, Android is designed to manage processes to
keep power consumption at a minimum, providing longer battery use.
You can distribute your Android app in many different ways: email, website or an
app marketplace such as Google Play.
Android users download billions of apps and games from the Google Play store
each month.
Google Play is a digital distribution service, operated and developed by Google that
serves as the official appstore for Android, allowing consumers to browse and
download apps developed with the Android SDK and published through Google.
4
History and Evolution
The history and versions of android are interesting to know. The code names of
android ranges from A to P and Q currently. Let's understand the android history in
a sequence.
4) Originally intended for camera but shifted to smart phones later because of low
market for camera only.
5) Android is the nick name of Andy Rubin given by coworkers because of his love
to robots.
5
Android is continually developed by Google and the Open Handset Alliance, and it
has seen several updates to its base operating system since the initial
release.Google provides major incremental upgrades to the Android operating
system every six to nine months, using confectionery-themed names.
6
To develop apps using the SDK, use the Java programming language for
developing the app and Extensible Markup Language (XML) files for describing
data resources. By writing the code in Java and creating a single app binary, you
will have an app that can run on both phone and tablet form factors. You can
declare your UI in lightweight sets of XML resources, one set for parts of the UI
that are common to all form factors, and other sets for features specific to phones or
tablets. At runtime, Android applies the correct resource sets based on its screen
size, density, locale, and so on.
To help you develop your apps efficiently, Google offers a full Java Integrated
Development Environment (IDE) called Android Studio, with advanced features
for developing, debugging, and packaging Android apps. Using Android Studio,
you can develop on any available Android device, or create virtual devices that
emulate any hardware configuration.
Android provides a rich development architecture. You don’t need to know much
about the components of this architecture, but it is useful to know what is available
in the system for your app to use. The following diagram shows the major
components of the Android stack — the operating system and development
architecture.
7
Resource Manager used to access to non-code resources such as localized strings,
graphics, and layout files.
Notification Manager used to display custom alerts in the status bar.
Activity Manager that manages the lifecycle of apps.
Content Providers that enable apps to access data from other apps.
All framework APIs that Android system apps use.
5. Linux Kernel:
The foundation of the Android platform is the Linux kernel. The above layers rely
on the Linux kernel for underlying functionalities such as threading and low-level
memory management. Using a Linux kernel enables Android to take advantage of
key security features and allows device manufacturers to develop hardware drivers
for a well-known kernel.
While the Android platform provide rich functionality for app development, there
are still a number of challenges you need to address, such as:
Android runs on billions of handheld devices around the world, and supports
various form factors including wearable devices and televisions. Devices can come
in different sizes and shapes that affect the screen designs for UI elements in your
apps.
In addition, device manufacturers may add their own UI elements, styles, and
colors to differentiate their products. Each manufacturer offers different features
with respect to keyboard forms, screen size, or camera buttons. An app running on
8
one device may look a bit different on another. The challenge for many developers
is to design UI elements that can work on all devices. It is also the developer’s
responsibility to provide an app’s resources such as icons, logos, other graphics,
and text styles to maintain uniformity of appearance across different devices.
An app's performance—how fast it runs, how easily it connects to the network, and
how well it manages battery and memory usage—is affected by factors such as
battery life, multimedia content, and Internet access. You must be aware of these
limitations and write code in such a way that the resource utilization is balanced
and distributed optimally. For example, you will have to balance the background
services by enabling them only when necessary; this will save battery life of the
user’s device.
You need to take precautions to secure your code and the user’s experience when
using your app. Use tools such as ProGuard (provided in Android Studio), which
detects and removes unused classes, fields, methods, and attributes, and encrypt all
of your app's code and resources while packaging the app. To protect your user's
critical information such as logins and passwords, you must secure the
communication channel to protect data in transit (across the Internet) as well as
data at rest (on the device).
Consider how to add new Android platform version features to an app, while
ensuring that the app can still run on devices with older platform versions. It is
impractical to focus only on the most recent Android version, as not all users may
have upgraded or may be able to upgrade their devices.
An Android app project begins with an idea and a definition of the requirements
necessary to realize that idea. As the project progresses, it goes through design,
development, and testing.
The high-level picture of the development process, with the following steps:
Defining the idea and its requirements: Most apps start with an idea of what it
should do, bolstered by market and user research. During this stage the app's
requirements are defined.
Prototyping the user interface: Use drawings, mock ups and prototypes to show
what the user interface would look like, and how it would work.
Developing and testing the app: An app consists of one or more activities. For
each activity you can use Android Studio to do the following, in no particular
order:
9
Create the layout: Place UI elements on the screen in a layout, and assign string
resources and menu items, using the Extensible Markup Language (XML).
Write the Java code: Create source code for components and tests, and use testing
and debugging tools.
Register the activity: Declare the activity in the manifest file.
Define the build: Use the default build configuration or create custom builds for
different versions of your app.
Publishing the app: Assemble the final APK (package file) and distribute it
through channels such as the Google Play.
Android Studio provides tools for the testing, and publishing phases of the
development process, and a unified development environment for creating apps for
all Android devices. The development environment includes code templates with
sample code for common app features, extensive testing tools and frameworks, and
a flexible build system.
After you have successfully installed the Android Studio IDE, double-click the
Android Studio application icon to start it.
Choose Start a new Android Studio project in the Welcome window, and name
the project the same name that you want to use for the app. When choosing a
unique Company Domain, keep in mind that apps published to the Google Play
must have a unique package name. Since domains are unique, prepending the app's
name with your name, or your company's domain name, should provide an
adequately unique package name. If you are not planning to publish the app, you
can accept the default example domain. Be aware that changing the package name
later is extra work.
When choosing Target Android Devices, Phone and Tablet are selected by default,
as shown in the figure below. The choice shown in the figure for the Minimum
SDK — API 15: Android 4.0.3 (IceCreamSandwich) — makes your app
compatible with 97% of Android devices active on the Google Play Store.
Different devices run different versions of the Android system, such as Android
4.0.3 or Android 4.4. Each successive version often adds new APIs not available in
the previous version. To indicate which set of APIs are available, each version
specifies an API level. For instance, Android 1.0 is API level 1 and Android 4.0.3
is API level 15.
The Minimum SDK declares the minimum Android version for your app. Each
successive version of Android provides compatibility for apps that were built using
the APIs from previous versions, so your app should always be compatible with
future versions of Android while using the documented Android APIs.
Choosing a template
10
Android Studio pre-populates your project with minimal code for an activity and a
screen layout based on a template. A variety of templates are available, ranging
from a virtually blank template (Add No Activity) to various types of activities.
You can customize the activity after choosing your template. For example, the
Empty Activity template provides a single activity accompanied by a single layout
resource for the screen. You can choose to accept the commonly used name for the
activity (such as MainActivity) or change the name on the Customize the Activity
screen. Also, if you use the Empty Activity template, be sure to check the
following if they are not already checked:
Generate Layout file: Leave this checked to create the layout resource connected to
this activity, which is usually named activity_main.xml. The layout defines the
user interface for the activity.
Backwards Compatibility (AppCompat): Leave this checked to include the
AppCompat library so that the app is compatible with previous versions of Android
even if it uses features found only in newer versions.
Android Studio creates a folder for the newly created project in the
AndroidStudioProjects folder on your computer.
1. The Toolbar.The
toolbar carries out a
wide range of actions,
including running the
Android app and
launching Android
tools.
2. The Navigation
Bar. The navigation
bar allows navigation
through the project
and open files for
editing. It provides a
more compact view of the project structure.
3. The Editor Pane. This pane shows the contents of a selected file in the project.
For example, after selecting a layout (as shown in the figure), this pane shows the
layout editor with tools to edit the layout. After selecting a Java code file, this pane
shows the code with tools for editing the code.
11
4. The Status Bar. The status bar displays the status of the project and Android
Studio itself, as well as any warnings or messages. You can watch the build
progress in the status bar.
5. The Project Pane. The project pane shows the project files and project
hierarchy.
6. The Monitor Pane. The monitor pane offers access to the TODO list for
managing tasks, the Android Monitor for monitoring app execution (shown in the
figure), the logcat for viewing log messages, and the Terminal application for
performing Terminal activities.
Tip: You can organize the main window to give yourself more screen space by
hiding or moving panes. You can also use keyboard shortcuts to access most
features.
Exploring a project
2. The Android
selection in the project
drop-down menu.
3. The
AndroidManifest.xml
file. Used for specifying
information about the
app for the Android
runtime environment. The template you choose creates this file.
4. The java folder. This folder includes activities, tests, and other components in
Java source code. Every activity, service, and other component is defined as a Java
class, usually in its own file. The name of the first activity (screen) the user sees,
which also initializes app-wide resources, is customarily MainActivity.
12
5. The res folder. This folder holds resources, such as XML layouts, UI strings, and
images. An activity usually is associated with an XML resource file that specifies
the layout of its views. This file is usually named after its activity or function.
6. The build.gradle (Module: App) file. This file specifies the module's build
configuration. The template you choose creates this file, which defines the build
configuration, including the minSdkVersion attribute that declares the minimum
version for the app, and the targetSdkVersion attribute that declares the highest
(newest) version for which the app has been optimized. This file also includes a list
of dependencies, which are libraries required by the code — such as the
AppCompat library for supporting a wide range of Android versions.
Before the Android system can start an app component, the system must know that
the component exists by reading the app's AndroidManifest.xml file. The app must
declare all its components in this file, which must be at the root of the app project
directory.
To view this file, expand the manifests folder in the Project: Android view, and
double-click the file (AndroidManifest.xml). Its contents appear in the editing
pane.
The Android Manifest is coded in XML and always uses the Android namespace:
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.helloworld">
The package expression shows the unique package name of the new app. Do not
change this once the app is published.
<application
...
</application>
The <application tag, with its closing </application> tag, defines the manifest
settings for the entire app.
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
...
The android:icon attribute assigns an icon in the mipmap folder (inside the res
folder in Project: Android view) to the app. The icon appears in the Launcher for
launching the app. The icon is also used as the default icon for app components.
13
App label and string resources
As you can see in the previous figure, the android:label attribute shows the string
"Hello World" highlighted. If you click on this string, it changes to show the string
resource @string/app_name :
...
android:label="@string/app_name"
...
Tip: Ctrl-click or right-click app_name in the edit pane to see the context menu.
Choose Go To > Declaration to see where the string resource is declared: in the
strings.xml file. When you choose Go To > Declaration or open the file by double
clicking strings.xml in the Project: Android view (inside the values folder), its
contents appear in the editing pane.
After opening the strings.xml file, you can see that the string name app_name is set
to Hello World . You can change the app name by changing the Hello World string
to something else. String resources are described in a separate lesson.
The android:theme attribute sets the app's theme, which defines the appearance of
user interface elements such as text:
...
android:theme="@style/AppTheme">
...
The theme attribute is set to the standard theme AppTheme .
Different devices may run different versions of the Android system, such as
Android 4.0 or Android 4.4. Each successive version can add new APIs not
available in the previous version. To indicate which set of APIs are available, each
version specifies an API level. For instance, Android 1.0 is API level 1 and
Android 4.4 is API level19.
The API level allows a developer to declare the minimum version with which the
app is compatible, using the <uses-sdk> manifest tag and its minSdkVersion
attribute. For example, the Calendar Provider APIs were added in Android 4.0 (API
level 14). If your app can't function without these APIs, declare API level 14 as the
app's minimum supported version like this:
The minSdkVersion attribute declares the minimum version for the app, and the
targetSdkVersion attribute declares the highest (newest) version which has been
optimized within the app. Each successive version of Android provides
compatibility for apps that were built using the APIs from previous versions, so the
app should always be compatible with future versions of Android while using the
documented Android APIs.
14
The targetSdkVersion attribute does not prevent an app from being installed on
Android versions that are higher (newer) than the specified value, but it is
important because it indicates to the system whether the app should inherit
behavior changes in newer versions. If you don't update the targetSdkVersion to the
latest version, the system assumes that your app requires some backward-
compatibility behaviors when running on the latest version. For example, among
the behavior changes in Android 4.4, alarms created with the AlarmManager APIs
are now inexact by default so that the system can batch app alarms and preserve
system power, but the system will retain the previous API behavior for an app if
your target API level is lower than "19" .
15
You can select a device from a list of predefined hardware devices. For each
device, the table shows its diagonal display size (Size), screen resolution in pixels
(Resolution), and pixel density (Density). For example, the pixel density of the
Nexus 5 device is xxhdpi , which means the app uses the icons in the xxhdpi folder
of the mipmap folder. Likewise, the app will use layouts and drawables from
folders defined for that density as well.
You also choose the version of the Android system for the device. The
Recommended tab shows the recommended systems for the device. More versions
are available under the x86 Images and Other Images tabs.
Always test your apps on physical device, because users will use the app on
physical devices. While emulators are quite
good, they can't show all possible device states, such as what happens if an
incoming call occurs while the app is running. To run the app on a physical device,
you need the following:
An Android device such as a smartphone or tablet. A data cable to connect the
Android device to your computer via the USB port. If you are using Linux or
Windows, it may be necessary to perform additional steps to run the app on a
hardware device. Check the Using Hardware Devices documentation. On
Windows, you may need to install the appropriate USB driver for the device. See
OEM USB Drivers. To let Android Studio communicate with a device, turn on
USB Debugging on the Android device. On Android version 4.2 and newer, the
Developer options screen is hidden by default. Follow these steps to turn on USB
Debugging:
1. On the physical device, open Settings and choose About phone at the
bottom of the Settings screen.
2. Tap the Build number information seven times. You read that correctly:
Tap it seven times.
3. Return to the previous screen (Settings). Developer options now appears at
the bottom of the screen. Tap Developer options.
4. Choose USB Debugging.
Now, connect the device and run the app from Android Studio.
17
Applications and Advantages of Android OS
Open Source Operating System: This is one of the greatest advantages of the
Android operating system. As the source code is open for all, developers and
device manufacturers can easily access the source code and make necessary
changes as per their hardware compatibility if required. This makes the operating
system highly customizable and research oriented. Even Google can take
suggestions and feedback from developers, testers and device manufacturers and
use these inputs for the betterment of the Android operating system.
Customized or Modified Rom: If you are bored of using your stock Android and
want to have some new and exciting features you can easily install any custom
ROM and enhance your user experience. There are several third-party applications
that help you in using the advanced features of Android by using a custom ROM.
User-Friendly Play Store: Both Google play store and Apple store has a
collection of more than 1 million applications that can be downloaded and used by
users as per their requirements. But Google play store is much easier to operate and
user-friendly as compared to Apple's App Store. This is because Apple is quite
strict while downloading apps and has much more restrictions. For example, you
need to have Apple iTunes in order to download and play a movie on your Apple
device. On the other hand, the Android play store is much more user-friendly with
an open interface that allows you to play movies on any device with a simple web
browser.
Easy & Affordable App Development: App development is extremely easy and
affordable when it comes to Android. You can easily develop your own app and list
it on the play store without the need to pay any substantial development fees.
Widgets: Android operating system offers ample widgets on the home screen
through which you can have access to the settings much quickly and easily. So, this
is another advantage of having android operating system over other OS.
Multitasking: If you possess an android phone, then you have an added advantage
of multitasking. This is because it can be used to perform several tasks at the same
time. For example, you can browse on the Internet as well as play music on your
android phone.
Ease of Notification: Every new activity that takes place within your android
phone like messages, email and all the other activities are displayed on your screen
18
in real time as notifications. Your phone will always be alerting thus you will never
miss anything that requires your attention on your phone.
References
https://developer.android.com/
https://en.wikipedia.org/wiki/Android_(operating_system)
https://www.roseindia.net/android/uses-of-android-technology.shtml
www.androidauthority.com
https://www.elprocus.com/what-is-android-introduction-featuresapplications/
https://medium.com/@developer45/5
https://www.androidheadlines.com/2018/10/prime-advantages-of-android-
operating-system.html
19
20