Académique Documents
Professionnel Documents
Culture Documents
Definition:
Android is a mobile platform which includes the OD [Linux kernel], UI,
and key applications.
1. Independent components
o Compatibility
o Definition
o Documenting
o Compatibility test suite
o Linux kernel – means only for lower level interface
T-Mobile G1 was the 1st mobile with android Operating System (2008).
1. GSM and EDGE and LTE networks for telephony or data transfer, enabling
users to make or receive calls SMS messages and retrieve data across mobile
networks.
2. Comprehensive APIs for location-based services such as GPS and network-
based location detection.
3. Full support for applications that integrate map controls as part of their user
interfaces.
4. Wi-Fi hardware access and Peer-To-Peer connections.
5. Full multimedia hardware control including playback and recording with
camera and microphone.
6. Media libraries for playing and recording a variety of audio/video or still
image formats.
7. APIs for using sensor hardware including compasses and other devices.
8. Libraries for using Bluetooth and NFC hardware for peer to peer data
transfer.
9. IPC message passing.
10.Shared data stores and APIs for contacts, social networking, calendar
and multimedia.
11. Background services(notifications), applications and processes.
12. Home screen widgets and live wallpapers.
13. The ability to integrate applications, search results into the system
searches.
14. An integrated open source HTML file Web kit-based browser.
15. Mobile optimized, hardware accelerated graphics including a path based
two-dimensional graphics library and support for 3-D graphics (open GL).
16. Localization thought a dynamic resources framework.
17. An application framework that encourages the reuse of application.
18. Components and the replacements of native application (calculator, alarm,
calendar and email client).
1. Android
2. Blackberry
3. IOS
Cloud storage facility
64-bit architecture
3rd party applications support
Optimized application management and hardware
No support for flash player
Based on Swift and objective C
Unix based security system
Designed on C#
No widgets, only notification bar
4. Samsung
5. Vodafone
6. Nokia
December 3, 2018
2. Power management
3. Process management
4. Memory management
Libraries(Middleware)
Divided into two parts
1. Android runtime
(i) Includes android libraries
(ii) Dalvik virtual machine(DVM)
December 5, 2018
ANDROID VERSIONS
Drivers
1. Display driver
2. Camera driver
3. Flash driver
4. Binder
5. Power
6. Audio
7. WIFI driver
8. Keypad driver
Important
Differences between JVM and DVM.
Process of using an app: JVM (query) APK (installed into the device)
Application Framework –
1. Activity manager
2. Window
3. Content provider
4. View manager package manger
5. Telephony manager
6. Resource manager
7. Location manager
8. Notification
Application Framework
Linux kernel
December 6, 2018
Major Points:
Minimum space required - 1.5 Mb to 100 Mb for the Linux kernel space
Two advantages of Linux:
1. Low cost
2. Android runs on Linux kernel.
It provides:
1. Hardware abstraction layer
2. Memory management
3. Process management
4. Network
Middleware/libraries
Java libraries:
(a) Includes a set of java files known as android java which is a
version of JAVA SE(Standard Edition)
JAVA SE consists of AWT(Application Window Tool)/Swing) and
also Android API.
2. Native Libraries
Piece of program or a code of a project which Is developed using open
source can be included in mobile applications.
1. SQLite - database
2. WebKit – browser (for fast HTML rendering)
3. LibC – C++ and C
4. OpenGL for graphics
5. Media CODECS(It offers supports for major audio or video CODECS)
6. BioNic
o Open source project
o It consists of small friendly libraries optimized for android
using the C and C++ language.
o It has the advantage of its speed and compact.
Open source
Application Framework
It consists of rich set of system services wrapped in an java API.
This ecosystem helps the developers to easily write apps for the android.
The other services within application framework are:
1. Location
2. Web
3. Telephony
4. WIFI
5. Bluetooth
6. Notifications
7. Media
8. Camera, etc.
1. Java:
Consists of .java source files for the project
By default, it includes a MainActivity.java
Source file having an activity class that runs when the app is
launched using the app icon.
3. Layout
This is the directory for files that define the application’s user
interface
4. Values
This Is the directory for various xml files that contain a
collection of resource which can contain string and color
specifications.
5. AndroidManifest.xml
This is the manifest file which describes the fundamental
characteristics of the application and defines each of its
components.
6. Build Gradle
This is an auto generated file which contains:
o Compile SDK version
o BuildTool version
o API
o Target SDK version
o View code
o View name
Importance of layout
1. Wrapped content
2. Match parent
3. ID ( assigns a value of the view which helps in runtime for java also
known as reference point) [important]
4. Text size (pixel – for only one particular device)
Has three different units:
a) Pixel (px)
b) Dp (device independent for low density text)
c) Sp (scale independent)
Example:
com.firstapp.MainActivity
Other types of layout:
Linear
a) Horizontal
b) Vertical
This can be changed in the property called orientation.
The layouts can also be nested
Frame
o Frame layout is designed for a screen where the image
or background can be added on the screen in which the
views can be on the background or image.
o The most important property for frame layout is source
(src)
o Sources are taken from mipmap/filename.
o This property is similar to card layout which is used in
java swing.
Grid
Introduction
The activity life cycle includes different methods during active state and
minimized state
Active state which is known as start activity calls three methods
OnCreate(); OnStart(); OnResume();
The next state is minimized stage. During this state two methods are
called in an order :
OnPause() OnStop();
After long time, if the activity is not active or open, then the two
methods OnStop(); and OnDestroy(); will shut down the activity.
Going back to main screen always call OnStart();
LOGCAT
It is used to get the status or a detailed description of the activity
Log.d() – method for getting info in logcat
ACTIVITY LIFECYCLE
Activity launcher
onCreate()
onStart()
onResume()
Another Activity
onPause()
onStop()
Activity is finishing
Destroy()
Activity
Toast
s
Checkbox
3. From widget . choose radio-button tools and drag and drop inside the radio group
Assign an ID for these radio buttons and radio group. Add a button outside the
radio group.
4. In the property of radio group, change the layout width.
JAVA File.
1. Ensure that the relevant packages for radio buttons and radio groups are included.
Syntax :
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
Declaration:
public class MainActivity extends AppCompatActivity {
private static RadioGroup radioG;
private static RadioButton btn;