0% found this document useful (0 votes)
38 views

Android Unit 1

The document discusses Android including what it is, its core components like activities and intents, UI components, notifications, and APIs. Android is an operating system for mobile devices developed by Google using Java and its Dalvik VM.

Uploaded by

u3552703
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Android Unit 1

The document discusses Android including what it is, its core components like activities and intents, UI components, notifications, and APIs. Android is an operating system for mobile devices developed by Google using Java and its Dalvik VM.

Uploaded by

u3552703
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Android Notes

What is Android?

Android is a software package and linux based operating system for mobile devices such as tablet
computers and smartphones.

It is developed by Google and later the OHA (Open Handset Alliance). Java language is mainly used
to write the android code even though other languages can be used.

The goal of android project is to create a successful real-world product that improves the mobile
experience for end users.

Dalvik Virtual Machine?

The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile devices. It
optimizes the virtual machine for memory, battery life and performance.

Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein.

The Dex compiler converts the class files into the .dex file that run on the Dalvik VM. Multiple class
files are converted into one dex file.

.apk file extension?


.apk file is an installer package file which install on google’s Operating System Called Android. Apk
stands for Android Application Package. It can also be run on certain other operating systems like
Blackberry Version 10.2.1 or higher than this version.

Fundamentals: Basic Building Blocks?

The core building blocks or fundamental components of android are activities, views, intents,
services, content providers, fragments and AndroidManifest.xml.

Activity: An activity is a class that represents a single screen. It is like a Frame in AWT.

View: A view is the UI element such as button, label, text field etc. Anything that you see is a view.

Intent: Intent is used to invoke components.

Service: Service is a background process that can run for a long time. There are two types of
services local and remote. Local service is accessed from within the application whereas remote
service is accessed remotely from other applications running on the same device.

Made by Aman Page 1


Content Provider: Content Providers are used to share data between the applications.

Fragment: Fragments are like parts of activity. An activity can display one or more fragments on
the screen at the same time.

AndroidManifest.xml: It contains informations about activities, content providers, permissions


etc. It is like the web.xml file in Java EE.

Android Virtual Device (AVD): It is used to test the android application without the need for
mobile or tablet etc. It can be created in different configurations to emulate different types of real
devices.

Broadcast Receivers & Content Providers?

Broadcast Receiver: They respond to broadcast messages from another application or system,
for example, a low battery message, or a no wifi connection message. They can respond to these
types of messages. They can receive messages from other apps. They have various types, such as
SMS broadcast receiver, Battery state, etc. You can create your own custom broadcast receiver.

Content Providers: This provides us access to data stored in our app or other apps safely. For
example, Whatsapp can access our contacts and numbers saved on the phone with content
providers.

UI components in android?
Views:
Sr.No. UI Control & Description
1 TextView

This control is used to display text to the user.


2 EditText

EditText is a predefined subclass of TextView that includes rich editing capabilities.


3 AutoCompleteTextView

The AutoCompleteTextView is a view that is similar to EditText, except that it shows a list of
completion suggestions automatically while the user is typing.

Made by Aman Page 2


4 Button

A push-button that can be pressed, or clicked, by the user to perform an action.

5 ImageButton

An ImageButton is an AbsoluteLayout which enables you to specify the exact location of its
children. This shows a button with an image (instead of text) that can be pressed or clicked
by the user.
6 CheckBox

An on/off switch that can be toggled by the user. You should use check box when
presenting users with a group of selectable options that are not mutually exclusive.
7 ToggleButton

An on/off button with a light indicator.


8 RadioButton

The RadioButton has two states: either checked or unchecked.


9 RadioGroup

A RadioGroup is used to group together one or more RadioButtons.


10 ProgressBar

The ProgressBar view provides visual feedback about some ongoing tasks, such as when
you are performing a task in the background.
11 Spinner

A drop-down list that allows users to select one value from a set.
12 TimePicker

The TimePicker view enables users to select a time of the day, in either 24-hour mode or
AM/PM mode.
13 DatePicker

The DatePicker view enables users to select a date of the day.

Made by Aman Page 3


Android Notification: Android Notification provides short, timely information about the action
happened in the application, even it is not running. The notification displays the icon, title and some
amount of the content text.

Set Android Notification Properties

The properties of Android notification are set using NotificationCompat.Builder object. Some of
the notification properties are mention below:

 setSmallIcon(): It sets the icon of notification.


 setContentTitle(): It is used to set the title of notification.
 setContentText(): It is used to set the text message.
 setAutoCancel(): It sets the cancelable property of notification.
 setPriority(): It sets the priority of notification.

Components for communication:


Intents: An Android Intent is an abstract description of an operation to be performed. It can be
used with startActivity to launch an Activity, broadcastIntent to send it to any interested
BroadcastReceiver components, and startService(Intent) or bindService(Intent,
ServiceConnection, int) to communicate with a background Service.

Intents & filters: Android OS uses filters to pinpoint the set of Activities, Services, and
Broadcast receivers that can handle the Intent with help of specified set of action, categories, data
scheme associated with an Intent. You will use <intent-filter> element in the manifest file to list
down actions, categories and data types associated with any activity, service, or broadcast receiver.

API & API Levels in android?


Application program interface (API) is a code for a programmer that they use in their
applications. This code or (API) allows you to add specific functionalities to your application. In other
words, we can say that APIs are the set of protocols and tools used for building software
applications. Here is the list of various Android APIs level:

Android Version API Level / SDK Version Name


Android 13 (Beta) Level 33 Tiramisu
Android 12 Level 32 (Android 12L) Snow Cone
Level 31 (Android 12)
Android 11 Level 30 (Android 11) Red Velvet Cake
Android 10 Level 29 (Android 10) Quince Tart
Android 9 Level 28 (Android 9) Pie
Android 8 Level 27 (Android 8.1) Oreo

Made by Aman Page 4


Level 26 (Android 8.0)
Android 7 Level 25 (Android 7.1) Nougat
Level 24 (Android 7.0)
Android 6 Level 23 (Android 6) Marshmallow
Android 5 Level 22 (Android 5.1) Lollipop
Level 21 (Android 5.0)
Android 4 Level 20 (Android 4.4w) KitKat
Level 19 (Android 4.4)
Level 18 (Android 4.3) Jelly Bean
Level 17 (Android 4.2)
Level 16 (Android 4.1)
Level 15 (Android 4.0.3 - 4.0.4) Ice Cream Sandwich
Level 14 (Android 4.0.1 - 4.0.2)
Android 3 Level 13 (Android 3.2) Honeycomb
Level 12 (Android 3.1)
Level 11 (Android 3.0)
Android 2 Level 10 (Android 2.3.3 - 2.3.7) Gingerbread
Level 9 (Android 2.3.0 - 2.3.2)

Level 8 (Android 2.2) Froyo


Level 7 (Android 2.1) Eclair
Level 6 (Android 2.0.1)
Level 5 (Android 2.0)
Android 1 Level 4 (Android 1.6) Donut
Level 3 (Android 1.5) Cupcake
Level 2 (Android 1.1) Petit Four
Level 1 (Android 1.0) None

Made by Aman Page 5

You might also like