Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 Overview
AsyncTask was intended to enable proper and easy use of the UI thread. However, the
most common use case was for integrating into UI, and that would cause Context leaks, missed
callbacks, or crashes on configuration changes.
CHAPTER 2
In this project we are using asynchronous task to display the toast message travelling
right to left.
AsyncTask class is firstly executed using execute () method. In the first step
AsyncTask is called onPreExecute () then onPreExecute () calls doInBackground ()
for background processes and then doInBackground () calls onPostExecute () method to
update the UI.
Much like creating an HTML layout and later altering it with jQuery, as we've done in previous
courses, we can create XML layouts in Android, and later alter them using Java logic.
Android XML layouts are also part of a larger umbrella of Android files and components called
resources. Resources are the additional files and static content an application needs, such as
animations, colour schemes, layouts, menu layouts.
JAVA:
Java is a class-based, object-oriented programming language and is designed to have as
few implementation dependencies as possible. A general-purpose programming language made
for developers to write once run anywhere that is compiled java code can run on all platforms
that support java.
Java applications are complied to byte code that can run on any Java Virtual Machine.
The syntax of Java is similar to C/C++.
Android Studio:
Android Studio is the official Integrated Development Environment (IDE) for Android app
development, based on IntelliJ IDEA. On top of IntelliJ's powerful code editor and developer
tools, Android Studio offers even more features that enhance your productivity when building
Android apps, such as:
• A unified environment where you can develop for all Android devices
CHAPTER 3
IMPLEMENTATION
Apps are developed for a variety of reasons: addressing business requirements, building
new services, creating new businesses, and providing games and other types of content for users.
Developers choose to develop for Android in order to reach the majority of mobile device users.
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.
Linux Kernal 5
Figure: Android Architecture
of all of the APIs to learn how to develop Android apps, but you can learn more about the
following APIs, which are useful for creating apps: View System used to build an app's UI,
including lists, buttons, and menus. 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.
3. Libraries and Android Runtime: Each app runs in its own process and with its own instance of
the Android Runtime, which enables multiple virtual machines on low-memory devices. Android
also includes a set of core runtime libraries that provide most of the functionality of the Java
programming language, including some Java 8 language features that the Java API framework
uses. Many core Android system components and services are built from native code that require
native libraries written in C and C++. These native libraries are available to apps through the
Java API framework.
4. Hardware Abstraction Layer (HAL): This layer provides standard interfaces that expose
device hardware capabilities to the higher-level Java API framework. The HAL consists of
multiple library modules, each of which implements an interface for a specific type of hardware
component, such as the camera or bluetooth module.
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.
CHAPTER 4
SNAPSHOTS
CONCLUSION
This application allows us to run the instruction in the background and then synchronize
again with our main thread. It is used to do background operations that will update the user
interface. This application code runs in our main thread and every statement is therefore execute
in a sequence. Here first we are going to fetch some data from API (Web service) and display it
in our user interface.
In the future this application can be increased the speed of the background operations so
that it can update the user interface as soon as possible.
REFERENCES
➢ https://www.tutorialspoint.com/android-asynctask-example-and-explanation
➢ https://google-developer-training.github.io/android-developer-fundamentals-course-
concepts/en/android-developer-fundamentals-course-concepts-en.pdf
➢ https://distancelearning.louisiana.edu/teach-remotely/asynchronous-teaching-tips
➢ Headfirst Android Development: A Brain-Friendly Guide 1st Edition