Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
227 views31 pages

Mobile Computing

This document provides an overview of mobile computing and mobile phones. It discusses the history of mobiles from the first cell phone invented in 1973 to modern smartphones. It also defines mobile computing as technology that allows wireless transmission of data, voice, and video between devices. Mobile hardware includes devices like smartphones, tablets, and PDAs. Mobile software is the operating system that runs on these devices. The document also summarizes the different generations of mobile phones and features of Android phones.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
227 views31 pages

Mobile Computing

This document provides an overview of mobile computing and mobile phones. It discusses the history of mobiles from the first cell phone invented in 1973 to modern smartphones. It also defines mobile computing as technology that allows wireless transmission of data, voice, and video between devices. Mobile hardware includes devices like smartphones, tablets, and PDAs. Mobile software is the operating system that runs on these devices. The document also summarizes the different generations of mobile phones and features of Android phones.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

1 CTH EDUCATION

Unit – 01 : Introduction to Mobile


 A brief history of Mobile,
 Types of mobile phone generations.
 The Mobile Ecosystem,
 Types of Mobile.
 Mobile Information Architecture,
 Android Versions, Features of Android, Android Architecture.
 Installing Android SDK Tools, Configuring Android in Eclipse IDE.
 "Android Development Tools (ADT), Creating Android Virtual Devices (AVD)".

Questions to be discussed :
1. Define mobile computing? Explain the application of mobile computing.
2. Discuss about Mobile. Write its advantage and disadvantage.
3. Explain in details generation of mobile phone.
4. What is android? Explain the features of android phone.
5. Write short notes on :
a. SDK Tools
b. Android Virtual Devices (AVD)

Mobile : The device which can able to move or be moved easily


Computing : It is the process of using computer technology to complete a given task.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
What is Mobile Computing?
 Mobile computing is a technology.
 It provides an environment where users can transmit data from one device to another without any physical link.
 In other words, you can say that mobile computing allows transmission of data, voice and video via a computer or
any other wireless device without being connected to a fixed physical link.
 In this technology, data transmission is done wirelessly with the help of wireless devices such as mobiles, laptops.
 This is only because of Mobile Computing technology that you can access and transmit data from any remote
locations without being present there physically.
 The concept of Mobile Computing can be divided into three parts:
1. Mobile Communication
2. Mobile Hardware
3. Mobile Software

Mobile Communication :
 Mobile Communication specifies a framework that is responsible for the working of mobile computing technology.
 This framework ensures the consistency and reliability of communication between wireless devices.
 The mobile communication framework consists of communication devices such as protocols, services, bandwidth,
and portals.
 These devices are responsible for delivering a smooth communication process.

Mobile Hardware:
 It consists of mobile devices or device components that can be used to receive or access the service of mobility.
 Examples of mobile hardware can be smartphones, laptops, portable PCs, tablet, Personal Digital Assistants, etc.
 These devices are inbuilt with a receptor medium that can send and receive signals.
 These devices are capable of operating in full-duplex.

Mobile Software:
 Mobile software is a program that runs on mobile hardware.
 This is the operating system for the appliance of mobile devices.
 In other words, you can say it the heart of the mobile systems.
 This is an essential component that operates the mobile device.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
Applications of Mobile Computing :
Following is a list of some significant fields in which mobile computing is generally applied:
 Sending and receiving information while on move
 Internet access.
 Global Position System (GPS).
 Emergency services.
 Transmission of news.
 Entertainment services.
 Educational services.

What is Mobile Phone?


 A mobile phone is a wireless handheld device that allows users to make and receive calls.
 A mobile phone is an electronic device which has made our life easier.
 It is also known as cell phone or cellular phone.
 We can call, send text message, watch video & play games etc. on mobile phone.
 It keeps us updated with the news of the world.
 It is also useful in personal as well as office work.
 Nowadays a mobile phone has become an important part of our life.
 It is a great source of entertainment.
 Excess use of mobile phone is very harmful for our health.

Advantage of Mobile Phone :


 Call anytime, any bady
 Easily data transfer
 Take photo and record video anytime
 Help in emergency
 Receive information very easily & quickly
 Show your talent

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION
Disadvantage of Mobile Phone :
 More expenditure of internet & call
 Not good for future
 Release harmful radiation
 Less communication at home
 Accidents

Types of Mobile Phones :


There are three types of phone :
1. Cell Phone
2. Features Phone and
3. Smart Phone

Cell Phone :
 A cellphone is any portable telephone that uses cellular network technology to make and receive calls.
 This type of phone is used to call, send message and do calculation etc.
 It is a normal phone which is widely used before 10 years.
 It is used in efficient manner and carry anywhere easily.

Features Phone :
 A mobile phone that incorporates features such as the ability to
access the internet and store and play music but lacks the advanced
functionality of a smartphone.
 In this phone user can use camera, Bluethooth, Music player &
Surfing internet also.

Smart Phones
 Smart phones are high specification phones that operate
like miniature computers.
 They can usually do tasks like connect to the internet and
receive emails.
 Recent examples of smart phones are the Apple iPhone,
Blackberrys and Google Android phones.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
5 CTH EDUCATION
History of Mobile Phone :
 The first cell phone was invented in 1973 by Motorola.
 Motorola engineer Martin Cooper made the first cell phone On April 3, 1973.
 The name of first mobile phone was Motorola DynaTAC 8000X.
 This device offered a talk time of just 30 minutes and required 10 hours to charging.

Cell phones became popular during the cellular revolution that started in the 90s.

1985, The first Siemens phone


 The first Siemens mobile phone was Siemens Mobiltelefon C1,
which came in the form of a suitcase.

1992, The first GSM (2G) phone


 As we moved into the 90s, phone bodies became smaller and the
antennas thinner.
 In 1992, the next big innovation came in the form of the Nokia 1011,
which was the first mass-produced GSM (2G) phone.

The first text message ever sent to a cellphone


 That same year, the first-ever text message was also sent.
 It was sent by a developer to the company director at Vodafone’s office Christmas party.
 The text message simply said: “Merry Christmas!”

1994, First smartphone (and touchscreen phone)


 The first smartphone was released in 1994.
 IBM’s Simon was the first device to feature apps and a touchscreen,
thus it is considered the world’s first smartphone.

1997, First phone with no external antenna


 The first phone to appear without a visible external
antenna was the Hagenuk Global Handy.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
6 CTH EDUCATION
2001, Launch of the 3G network
 The first commercial 3G networks were introduced in 2001.
 It’s worth mentioning that custom ringtones were also released that same year, thus becoming the first
downloadable content available for cell phones.

2008, First Android phone


 The first Android phone, the HTC Dream, was also launched in 2008.
 The introduction of the Android operating system was criticized
due to its lack of functionality and third-party software, but, it was
considered innovative due to its notifications system
and integration with Google's services.

2009, Launch of the 4G network


 The first release of the Long Term Evolution (LTE) standard was commercially deployed in Norway and Sweden
in 2009 and has since become common throughout most parts of the world.

2019, Launch of the 5G network


 In 2019, the fifth-generation network was launched, and so were the first 5G phones.
 The next-generation network came with some bizarre controversies, which we covered here on our blog.

Note :
 2020 has also been marked by improvements in battery life and charging speeds.
 More and more phones now feature fast charging, which is sure to further improve in the upcoming years.

Mobile Phone Generation :


 The cellular communications networks are known by their numeric generation: 1G, 2G, 3G, 4G and 5G.
 We are currently fully deployed in 4G with 5G gaining ground.

1G (1st Generation):
 First-time calling was introduced in mobile systems.
 It used analog signals.
 Communication was possible through voice only.
 Speed:- 2.4 kbps.

2G (2nd Generation) :
 Shifted from analog to digital.
 It supported voice and SMS both.
 2G WLAN provided a high data rate & large area coverage.
 Speed:- 64 kbps.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
7 CTH EDUCATION
3G (3rd Generation) :
 The Internet system was improved.
 Offers high-speed wireless internet.
 The connection used was UMTS and WCMA.
 Speed:- 2mbps.

4G (4th Generation) :
 LTE (Long term evaluation) was mainly for the internet.
 Vo-LTE (Voice over LTE) is for both voice and the internet.
 HD Quality Streaming.
 Speed:-100mbps.

5G (5th Generation):
 It is yet to come in many countries but here are some notable points about 5G.
 Higher data rates.
 It is 30 times faster than 4G.

What is Android?
 Android is an open source and Linux-based Operating System.
 It is useful for mobile devices such as smartphones and tablet computers.
 Android was developed by the Open Handset Alliance, led by Google, and other companies.
 The first beta version of the Android Software Development Kit (SDK) was released by Google in 2007 where as the
first commercial version, Android 1.0, was released in September 2008.
 On June 27, 2012, Google announced the next Android version, 4.1 Jelly Bean.
 Jelly Bean is an incremental update, with the primary aim of improving the user interface, both in terms of
functionality and performance.

Features of Android
Android is a powerful operating system and supports great features listed below :
 Beautiful UI
 Connectivity
 Media support
 Multitasking
 Resizable widgets
 Wi-Fi Direct
 Web browser

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
8 CTH EDUCATION
What is Android Architecture?
 It is a mobile operating system that has an open-source framework and is based on Linux
 Android Architecture helps us to develop advanced and user-friendly applications.
 Android Architecture, divide into five levels, which are the ‘
1. Linux kernel,
2. Libraries,
3. Application framework,
4. Android runtime, and
5. System applications.

Android SDK :
 Android SDK stands for Android Software Development Kit.
 It is developed by Google for Android Platform.
 With the help of Android SDK, we can create android Apps easily.
 Android SDK is a collection of libraries and Software Development tools that are essential for Developing
Android Applications.
 Whenever Google releases a new version or update of Android Software, a corresponding SDK also releases
with it.

SDK tools
 SDK tools are platform independent and are required no matter which android platform you are working on.
 The list of SDK tools has been given below −

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
9 CTH EDUCATION
Tool Description

android
This tool lets you manage AVDs, projects, and the installed components of the SDK

ddms
DDMS stands for Dalvik debug monitor server, this tool debug Android applications.

emulator This tools let you test your applications without using a physical device

proguard
Shrinks, optimizes, and obfuscates your code by removing unused code

traceview
Provides a graphical viewer for execution logs saved by your application

Adb Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an
emulator instance or connected Android-powered device.

What is AVD?
 AVD stands for Android Virtual Devices.
 An AVD contains a hardware profile, system image, storage area, skin, and other properties.
 An AVD is a configuration that defines the characteristics of an Android phone, tablet etc.
 The Device Manager is a tool you can launch from Android Studio that helps you create and manage AVDs.

Creating Android Virtual Devices (AVD)":


To open the new Device Manager, do one of the following:
 From the Android Studio Welcome screen, select More Actions > Virtual Device Manager.
 After opening a project, select View > Tool Windows > Device Manager from the main menu bar, and then
click Create device.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
10 CTH EDUCATION
Mobile information architecture :
 Mobile information architecture are used in the context of mobile design.
 MIA has two primary concerns:
1. Identify and define the content and functionality that exist within mobile interfaces.
2. Determine how different pieces of content within mobile interfaces relate to each other.
Information architects create content structure by:
 Classifying mobile content
 Auditing content for quality
 Establishing user-centric relationships between content
 Generating navigation components that make content easier to find

Mobile Ecosystem :
 Mobile ecosystem is a collection of multiple devices(Mobile, Tablet etc.), software(OS, development tool,
testing tool etc.), companies(Device manufacturer, app development, testing companies)and the
process(sms, transaction etc.) by which data is transferred/shared by a user from one device to another
device or by the device itself.
 Data sharing can be done between devices of the same operating system or different operating system.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
1 CTH EDUCATION
Unit – 02 : Creating first android application.
 Anatomy of android application,
 Deploying Android app on USB connected Android device.
 Android application components, Activity life cycle.
 Understanding activities,
 Exploring Intent objects, Intent Types,
 Linking activities using intents.

Questions to be discussed:
1. What is Android? Write the features of android.
2. Explain in brief components of android application.
3. Discuss about activity life cycle.
4. What is intent? Also explain its type.
5. Write short notes on :
a. Anatomy of an android application
b. Linking activities using intents.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
What is Android?
 Android is an open source and Linux-based OS for mobile devices.
 Android was developed by the Open Handset Alliance, led by Google.
 The first beta version of the Android Software Development Kit (SDK) was released
by Google in 2007 where as the first commercial version, Android 1.0,
was released in September 2008.
 On June 27, 2012, Google announced the next Android version, 4.1 Jelly Bean.
 Jelly Bean is an incremental update, with the primary aim of improving the user interface, both in terms
of functionality and performance.
 The source code for Android is available under free and open source software licenses.

Features of Android :
 Beautiful UI : Android OS basic screen provides a beautiful and intuitive user interface.
 Connectivity : GSM/EDGE, CDMA, UMTS, Bluetooth, Wi-Fi, LTE, NFC and WiMAX.
 Storage : SQLite, a lightweight relational database, is used for data storage purposes.
 Media support : H.263, H.264, MPEG-4, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3, MIDI, WAV,
JPEG, PNG, GIF, and BMP.
 Messaging : SMS and MMS :
 Multi-tasking : User can jump from one task to another and same time various application can run
simultaneously.
 Wi-Fi Direct : A technology that lets apps discover and pair directly, over a high-bandwidth peer-to-
peer connection.

History of Android:
 Initially, Andy Rubin founded Android Incorporation at California, United States in October, 2003.
 Originally intended for camera but shifted to smart phones later because of low market for camera.
 The key employees are Andy Rubin, Rich Miner, Chris White and Nick Sears.
 Android is the nick name of Andy Rubin given by coworkers because of his love to robots.
 In 17th August 2005, Google acquired android Incorporation.
 In 2007, Google announces the development of android OS.
 In 2008, first android mobile launched HTC Dream(T-mobile G1).
 The code names of android ranges from A to M currently, such as Aestro, Blender, Cupcake, Donut,
Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwitch, Jelly Bean, KitKat, Lollipop and
Marshmallow.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
What is anatomy in android application?
 The anatomy is the structure of android application.
 It explores the needs of the mobile app user.
 The structure of android contains :
 Src
 Android library
 Gen
 Assets
 Res
 AndroidManifest.xml

src :
 Src contains .java source files for your project.
 In this example, there is one file, MainActivity.java.
 The MainActivity.java file is the source file for your activity.
 You will write the code for your application in this file.

Android 3.0 library :


 This item contains one file, android.jar, which contains
all the class libraries needed for an Android application.

gen :
 Contains the R.java file, a compiler-generated file that references all the resources found in your project.
 You should not modify this file.

assets :
 This folder contains all the assets used by your application, such as HTML, text files, databases, etc.

res :
 This folder contains all the resources used in your application.

AndroidManifest.xml :
 Here you specify the permissions needed by your application, as well as other features.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION
Components of android application:
1. Activities
2. Services
3. Content Providers
4. Broadcast Receivers

Activity:
 Every single activity on screen with the help of UI is called activity.
 An android application is a collection of task and each task is called an activity.
 Each activity within an application has a unique task or purpose.
 They dictate the UI and handle the user interaction to the smart phone screen.
 Activities are said to be the presentation layer of our applications.
 Each activity is completely isolated from each other.

Services:
 They handle background processing associated with an application.
 Services are like invisible workers of our app.
 These components runs in background, updating your activities, triggering Notification, and also
broadcast Intents.
 They also perform some tasks when applications are not active.

Content Providers
 They handle data and database management issues.
 They are also responsible for sharing the data beyond the application boundaries.
 The Content Providers of a particular application can be configured to allow access from other
applications, and the Content Providers exposed by other applications can also be configured.
 A content provider should be a sub-class of the class Content Provider.

Broadcast Receivers
 These components are used for user alert.
 It can used status bar for notification.
 They are known to be intent listeners.
 Broadcast Receivers make our application react to any received Intent.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
5 CTH EDUCATION
Activity life cycle:
 In android java file is called activity.
 An Android activity goes through for stages:
1. Does not exist
2. Foreground stage
3. Background stage
4. Pause
 These activities life cycle having 6 methods:
 onCreate()
 onStart()
 onResume()
 onPause()
 onStop(), and
 onDestroy().

What is Intents?
 The intent is a messaging object which tells what kind of action to be performed.
 They are extensively used throughout Android.
 It is an object used to request an action from another app component via the Android system.
 Intents can be used to start and stop Activities and Services.
 The process of taking users from one application to another is achieved by passing the Intent.
 Intents, in general, are used for navigating among various activities within the same application, or
they can be moving from one application to another as well.

What can intents do?


1. Start activities
 A button click starts a new activity for text entry
 Clicking Share opens an app that allows you to post a photo
2. Start services
 Initiate downloading a file in the background
1. Deliver broadcasts
 The system informs everybody that the phone is now charging

Types of Android Intents


 There are two types of intents in android
1. Implicit
2. Explicit

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
6 CTH EDUCATION
Implicit Intent
 Implicit Intent doesn’t specify the component.
 Implicit Intent states the action to be performed.
 It is not responsible for calling specific in-app components.
 For example, if the user wants to see a location on a map, we can use an Implicit Intent to switch to
another app that displays a specific location on a map.

Explicit Intent
 Explicit Intent specifies the component.
 Explicit Intent is used to invoke a specific target component.
 It is used to switch from one activity to another in the same application.
 For example, we can use an explicit intent to start a new activity when the user invokes an action or
plays music in the background.

Explicit and implicit intents


1. Explicit Intent
 Starts a specific activity
 Request tea with milk delivered by Nikita
 Main activity starts the ViewShoppingCart activity

2. Implicit Intent
 Asks system to find an activity that can handle this request
 Find an open store that sells green tea
 Clicking Share opens a chooser with a list of apps

Linking activity using intent:


 An intent is a description of an operation to be performed.
 An Intent is an object used to request an action from another app component via the Android system.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
1 CTH EDUCATION
Unit – 03 : Mobile Computing
 Fragments life cycle, List fragment, Dialog fragment.
 Interaction between fragments.
 "Understanding the components of a screen (Layouts),
 Adapting to display orientation.
 Action Bar & Progress Bar.
 Views (UI Widgets)-Button,
 Toast and Spinner,
 Toggle Button, Check Box and Radio Button,
 Web View, List View, Edit Text,
 Date Picker and Time Picker,
 Analog and Digital clock,

Questions to be discussed?
1. What is Fragment in Android? Also explain its type.
2. Explain Fragments life cycle in details.
3. What is screen orientation? Explain types of android screen orientation.
4. Differentiate between Analog and Digital clock.
5. Write short notes on:
a) Action Bar
b) Progress Bar
c) UI Widgets
d) Android Toast

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
What is fragment in Android?
 In Android, the fragment is the part of Activity.
 There can be more than one fragment in an activity.
 Fragments represent multiple screen inside one activity.
 Fragments can exist only inside an activity as its lifecycle is dependent on the lifecycle of host activity.
 For example, if the host activity is paused, then all the methods and operations of the fragment
related to that activity will stop functioning, thus fragment is also termed as sub-activity.
 Fragments can be added, removed, or replaced dynamically i.e., while activity is running.
 <fragment> tag is used to insert the fragment in an android activity layout.

Types of Android Fragments:


1. Single Fragment
2. List Fragment
3. Fragment Transaction

Single Fragment:
 Display only one single view on the device screen.
 This type of fragment is mostly used for mobile phones.

List Fragment:
 This Fragment is used to display a list-view from which the user can select the desired sub-activity.
 The menu drawer of apps like Gmail is the best example of this kind of fragment.

Fragment Transaction:
 This kind of fragments supports the transition from one fragment to another at run time.
 Users can switch between multiple fragments like switching tabs.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
Fragment Life Cycle:
 As we know that the fragment is the part of an Activity.
 Android fragments have their own life cycle very similar to an android activity.
 The list of methods in a fragment class is :
 onAttach()
 onCreate()
 onCreateView()
 onActivityCreated()
 onStart()
 onResume()
 onPause()
 onStop()
 onDestroyView()
 onDestroy()

Interaction between Fragment:


 As we know that the fragment is the part of an Activity.
 There can be a number of fragments within one activity and they have their own life cycle.
 Now a day most apps have so many features so that they use multiple fragments in a single app.
 Communication is one of the important parts of apps for sharing data from one fragment to another.
 Two fragments can’t communicate directly.
 There are multiple ways in which we can communicate within apps:
1. We can communicate within fragments using the ViewModel.
2. We can also communicate between fragments using Interface.

Adapting Android Screen Orientation :


 The screen Orientation is the attribute of an activity element.
 Screen Orientation is also known as screen rotation.
 The orientation of android activity can be portrait, landscape, sensor, unspecified etc.
 You need to define it in the AndroidManifest.xml file.
 When screen orientation change from one state to other, it is also known as configuration change.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION
The common values for screen Orientation attribute are as follows:

Value Description

unspecified It is the default value. In such case, system chooses the orientation.

portrait taller not wider

landscape wider not taller

sensor orientation is determined by the device orientation sensor.

What is UI widget in an Android?


 A widget is a small gadget or control of your android application placed on the home screen.
 It is an element of a graphical UI that displays information or provides a specific way for a user to
interact with an application.
 There are various android widgets such as
 Button,
 Edit Text,
 Toggle Button,
 Date Picker,
 Time Picker,
 Progress Bar etc.

Android Button:
 A button consists of text or an icon that communicates what action occurs when the user press it.

Edit Text:
 It is a Widget of user interface (UI) used to retrieve and modify text data from a user in an Android app.
 Edit Text is a subclass of Text View that inherit all the property of Text View.

Android Toast:
 Displays information for the short duration of time.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
5 CTH EDUCATION
Toggle Button:
 It has two states ON/OFF.

Check Box:
 Checkboxes allow the user to select one or more options from a set.

Radio button:
 Radio buttons allow the user to select one option from a set.

Spinner:
 A spinner is a graphical GUI widget that allows a user to modify the value in the adjacent text box by
either clicking the up or down arrow, or holding the up or down arrow.
 It also allowing the value to increase or decrease.

Date Picker:
 Date picker displays the date picker dialog that can be used to pick the date.

Time Picker:
 Time Picker displays the time picker dialog that can be used to pick the time.

Action Bar in Android :


 Android Action Bar is a menu bar that present at the top of the activity screen in android.
 Action Bar can contain menu items which become visible when the user click.
 Android Action Bar was launched by Google in 2013 with the release of Android 3.0.
 Before that, the name of the action bar was App Bar.
 App Bar contains only the name of the application or current activity.

Progress Bar in Android:


 In Android, Progress Bar is a graphical view indicator that shows some progress.
 Android progress bar displays a bar representing the completing of the task.
 Progress bar in android is useful since it gives the user an idea of time to finish its task.
 It displays the status of progress of the given task (such as downloading an image) to the user.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
6 CTH EDUCATION
Android Toast:
 Toast can be used to display information for the short period of time.
 A toast contains message to be displayed quickly and disappears after sometime.
 A toast provides simple feedback about an operation in a small popup.
 It only fills the amount of space required for the message and the current activity.
 Toasts automatically disappear after a timeout.

Digital clock :
 This type of clock shows numbers to display the time in a digital format.
 Digital clocks are often called as Electronic Clocks.
 Recent clocks are showing Date, Day, Month, Year, Temperature etc.
 Digital clocks are developed by Thomas Bromley in 1961.

Analog clock :
 A clock is called "analog" when it has moving hands and hours marked from 1 to 12 to show time.
 There are three hands in a clock, the hour hand, the minute hand, and the second hand.
 Initially invented in the Netherlands by Christian Huygens in 1656.

What is the difference between digital and analog clock?

Digital Clock Analog Clock

A digital clock uses only numbers to show the An analog clock uses an hour hand and a minute
time. hand to show the time.

Digital clock uses digital technology. Analog clock uses analog technology.

In digital technology, translation of information In Analog technology, information is translated into


is into binary format (zero or one). electric pulses.

Digital clocks are more accurate than analog. Analog clocks are less accurate than digital clock.

It has more features with respect to analog clock. It has less features with respect to digital clock.

Digital clock is less expansive. Analog clock is more expansive.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
1 CTH EDUCATION
Unit – 04:
 Menus-Option,
 Context,
 Popup,
 Images-Image View,
 Image Switcher.
 Alert Dialog,
 Alarm manager.
 SMS,
 E-mail,
 Media Player,
 Handling Telephony Manager.

Questions to be discussed:
1. What is menus option? Explain in brief.
2. Explain in details about image view and image switcher.
3. What is E-mail? Explain in details with examples.
4. Discuss about alarm manager.
5. Write short notes on:
a. Pop-up
b. Alert dialog
c. Context
d. SMS
e. Media player

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
Menus Option:
 Menus are a common user interface component in applications.
 It should use to present user actions and other options in your activities.
 The options menu is the primary collection of menu items for an activity.
 When and how this item should appear as an action is decided by the Show Action attribute.
 They can be used for open, share, settings, searching, deleting items, etc.

Context:
 Context represents any information.
 It can be used to characterize the situation of an entity.
 An entity is a person, place or object that is considered as interaction between user and an application.
 Context can take many forms, including background information or details about the circumstances, or
timeframe in which a work takes place.
 Example: A devices that change their screens and backlighting according to the amount of light in the
room where they are being used.

Pop-up:
 A pop-up is a GUI that suddenly appears in the foreground of the visual interface.
 Pop-ups are web browser windows or dialogue boxes that open without any user action.
 There are two main categories of pop-up:
1. Computer dialogue boxes
2. Advises window

Computer dialogue boxes:


 It appear as a pop-up window on your desktop or mobile device.
 It is used to communicate relevant information from a computer or application to you.
 Sometimes this pop-up appears when it's necessary for you to enter a password.
 Example: when you make a purchase on your smartphone and need to enter your password to authorize
the purchase.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
Alert window:
 This pop-up often appears on the window that alert you that a step you're trying to perform isn't
allowed and requires a different keystroke or command.
 These types of pop-ups on computers and device facilitate a method of alerting you that some action is
necessary.

Image View:
 Image view is used to display any kind of image file in the application.
 It is also used to control the size and movement of an image.
 Image View comes with different configuration options to support different scale types.
 Scale type options are used for scaling the bounds of an image to the bounds of the image view.
 Some of them scale types configuration properties are center, center_crop, fit_xy, fitStart etc.

Image Switcher:
 In certain cases, you may not want an image to appear abruptly on screen.
 You would prefer that its transition from one image to another with some kind of animation.
 Android supports this in the form of Image Switcher.
 An image switcher allows you to add some transitions to the images through the way they appear on
the screen.

Alert Dialog:
 A dialog is a small window that prompts the user to make a decision or enter additional information.
 Alert Dialog can be used to display the dialog message with OK and Cancel buttons.
 It displays the message to warn you and then according to your response, the next step is processed.
 It can be used to interrupt and ask the user about his/her choice to continue or discontinue.
 Android Alert Dialog is built with the use of three fields: Title, Message area, and Action Button.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION

What is an alarm manager?


 Alarm Manager allows you to access system alarm.
 By the help of Alarm Manager, you can schedule your application to run at a specific time in the future.
 It works whether your phone is running or not.
 Alarm Manager is a bridge between application and Android system alarm service.
 Example, you could use an alarm to initiate a long-running operation, such as starting a service once a
day to download a weather forecast.

What is SMS?
 SMS stands for Short Message Service.
 SMS is a form of text message that's sent from one device to another.
 It is a service for sending short messages of up to 160 characters to mobile devices, including cellular
phones and smart phones.
 That very first text, sent on the 3rd December 1992, simply said, “Merry Christmas.”
 Engineer Neil Papworth sent the world's first SMS to the Vodafone director Richard Jarvis.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
5 CTH EDUCATION
What is an E-mail?
 E-mail stands for Electronic Mail.
 It is a method to sends messages from one computer to another computer through the internet.
 E-mail is a communication system that sends and receives message by using specific e-mail address.
 E-mail address consists of two parts: first part @ second part.
 In first part user can give any name according to choice.
 Second part is the domain name that indicate mail server on which you are going to create the e-mail id.
 Email services started in 1971 by Ray Tomlinson.
Example:
[email protected]
[email protected]
[email protected]
[email protected]

Media player:
 Media player is an application software.
 It is used for playing multimedia files like audio and video.
 For example, many media players today are capable of playing audio files such as playing an MP3 song
file and video files such as a short video clip or movie.
 Examples of media players: iTunes, Media Monkey, VLC, Windows Media Player etc.

Telephony Manager:
 Telephony manager provides us the functionalities of the mobile.
 It gives us information about functionalities like calls, SMS, MMS, IMEI number, and so on.
 It also provides information about the telephony services such as subscriber id, sim serial number, phone
network type etc.
 Applications can use the methods in this class to determine telephony services and states, as well as to
access some types of subscriber information.
 Applications can also register a listener to receive notification of telephony state changes.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
1 CTH EDUCATION
Unit – 05: Mobile Computing
 Storing the data persistently –
 Data Storage Options: preferences, Internal Storage, External Storage, Content Provider.
 The SQLite database,
 Database operations -Insert, Delete, Update, Fetch.
 Publishing android applications,
 Deploying APK files.

Questions to be discussed:
1. What do you mean by data persistent?
2. Explain different data storage options in an android.
3. What is SQLite database? Discuss its advantage & disadvantage.
4. Discuss various operations performed on SQLite database
5. What is APK? How to develop APK files?

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
Storing the data persistently:
 Persistent storage is any data storage device that retains data after power to that device is shut off.
 It is also sometimes referred to as non-volatile storage.
 Android provides several options for you to save persistent application data.
 Your data storage options are the following:
1. Shared Preferences
2. Internal Storage
3. External Storage
4. Content provider
5. SQLite Databases

Shared Preferences:
 Store private primitive data in key-value pairs.
 The Shared Preferences class provides a general framework that allows you to save and retrieve
persistent key-value pairs of primitive data types.
 You can use Shared Preferences to save any primitive data: boolean, floats, int, long, and string.

Internal Storage:
 Store private data on the device memory.
 You can save files directly on the device's internal storage.
 By default, files saved to the internal storage are private to your application
and other applications cannot access them (nor can the user).
 When the user uninstalls your application, these files are removed.

External Storage:
 Store public data on the shared external storage.
 External storage is used to store application data, such as SD card.
 In general there are two types of External Storage:
1. Primary External Storage
2. Secondary External Storage

Primary External Storage:


 It is in-built shared storage which is “accessible by the user by plugging in a USB cable.
 Example: When we say 4GB, 32 GB.

Secondary External Storage:


 It is type of storage which is removed from the android if required.
 It is also known as removable storage. Example: SD Card

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
Content provider:
 A content provider component supplies data from one application to others on request.
 Such requests are handled by the methods of the Content Resolver class.
 A content provider can use different ways to store its data and the data can be stored in a database, in
files, or even over a network.
 Sometimes it is required to share data across applications then content providers become very useful.

What is database?
 It is an organized collection of structured information or data that stored electronically in computer.
 A database is usually controlled and managed by database management system (DBMS).
 Most commonly used database is SQL.
 SQLite database is used in android.

Android SQLite Database:


 SQLite is an open source relational database.
 It is lighter version of SQL.
 Android comes with built-in SQLite database implementation.
 To access this database, you do not need to establish any kind of connections like JDBC, ODBC etc.
 Main components of SQLite is:
 Table structure (Rows and columns).
 Types of data (int, float, char, double, Boolean etc).
 Constraints (Primary and secondary key).
 Queries (Select, Insert, Update and Delete).

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION
SQLite Advantages SQLite Disadvantages
 Lightweight  SQLite is used to handle low to medium traffic HTTP requests.
 Better Performance  Database size is restricted to 2GB in most cases.
 No Installation Needed
 Portable

Insert, Read, Delete & Update operation in SQLite:


 Android provides different ways to store data locally so using SQLite is one of the way to store data.
 For managing all the operations related to the database, an helper class has been given and is called
SQLiteOpenHelper.
 It automatically manages the creation and update of the database.
 Android OS has its own implementation to perform CRUD operations.
1. Create
2. Read
3. Update
4. Delete

What is APK?
 APK stand for Android Application Package.
 It is a package file format used by android OS for distribution and installation of mobile app.
 It is similar to executable file .exe in windows operating system.
 The extension of APK file is .apk.
 It is installed on android operating system.

Publishing Android Application:


 Android application publishing is a process that makes your Android applications available to users.
 Infect, publishing is the last phase of the Android application development process.
 Once you developed and fully tested your Android Application, you can start selling or distributing free
using Google Play Store.
 You can also release your applications by sending them directly to users or by letting users download
them from your own website.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)

You might also like