0% found this document useful (0 votes)
32 views13 pages

Mobile Final

The document provides an overview of key Android architecture components and application types. It discusses the Android software stack including activities, views, user notifications, data storage options, services lifecycle, sensors, and location access in Android. Activities provide screens for user interaction and common application types include foreground, background, and intermittent apps. The software stack includes activities, views for user interface elements, and notifications like toasts and status bars. Data can be stored in shared preferences, files, SQLite databases, or remote servers. Services have their own lifecycle and bound services allow interaction from activities. Sensors measure physical values and location can be accessed with foreground or background permissions.

Uploaded by

reema daily
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)
32 views13 pages

Mobile Final

The document provides an overview of key Android architecture components and application types. It discusses the Android software stack including activities, views, user notifications, data storage options, services lifecycle, sensors, and location access in Android. Activities provide screens for user interaction and common application types include foreground, background, and intermittent apps. The software stack includes activities, views for user interface elements, and notifications like toasts and status bars. Data can be stored in shared preferences, files, SQLite databases, or remote servers. Services have their own lifecycle and bound services allow interaction from activities. Sensors measure physical values and location can be accessed with foreground or background permissions.

Uploaded by

reema daily
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/ 13

Chapter 1

List Android Architecture

• The Linux Kernel


• Android Runtime
• Native Libraries
• Java API Framework
• System Apps

Application Types

• Foreground: An application that’s only useful when it’s in the


foreground and is effectively suspended when it’s not visible.

• Background: An application with limited interaction that, apart from


when being configured, spends most of its lifetime hidden.
Examples:call screening applications, SMS auto-responders.

• Intermittent: Expects some interactivity but does most of its work in


the background. Often these applications will be set up and then run
silently, notifying users when appropriate. A common example would be
Chat ,Email, media player App.

• Widgets: Interactive visual components that users can add to their


home screens. Usually used to display (dynamic) information such as battery
levels, weather forecasts, or the date and time.
Chapter 2
List Android Software Stack (Application framework
layer)

What is an Activity?

An ”activity” is an application component that provides a screen with which


users can interact.
Android Activity

• Activity is usually a single screen..


- Implemented as a single class extending Activity
- Displays user interface controls (views)
- Reacts on user input / events.
• An application typically consists of several activities..
- Each screen is typically implemented by one activity
- Each activity can then start another activity (new screen)
- An activity may return a result to the previous activity
• "main" activity is presented to the user when launching the application for the
first time.
• Each activity receives callbacks due to a change in its state during its lifecycle
— whether the system is creating it, stopping it, resuming it, or destroying it.

Chapter 3 part 1
VIEWS (INPUT CONTROLS/ WIDGETS)

• Text View: Label


• Edit Text: Editable text
• Button: Standard push button
• CheckBox: Standard checkbox
• RadioButton: Standard radio button
• List View: View group that manages a group of Views.
• Spinner: TextView associated with ListView. Let's you select an item from a
list.
Chapter 3 part 2
List and Explain User Noti cations:

• Toast Notification: Brief message


• Status Bar Notification: Persistent reminder and Highly configurable
• Dialog Notification: Activity-related notification

Explain one User Noti cation and give an example:

Status bar notification: is a brief visual alert displayed in the status bar of a
device, providing users with information or updates from an application even
when it's not actively in use.

Example Whatsapp: when you receive a new message, a status bar notification
appears at the top of your phone screen. It typically includes the sender's name
and a snippet of the message, allowing you to quickly see and access the new
message without opening the app.
fi
fi
Chapter 4
Where can save store the data?

• Shared Preferences
• Bundles
• Local files
• Local database (SQLite)
• Remote database

Saving UI State:

Activity should save its user interface state each time it moves to the
background..
• Required due to OS killing processes..

• Even if you think your app will be in the foreground all the
time, you need to do this, because of....
- Phone calls
- Other apps
- The nature of mobile use

How much space does your data require?


Internal storage has limited space, use other types of storage if you need to save
a substantial amount of data.

How reliable does data access need to be?


If your app's basic functionality requires certain data, place the data within
internal storage directory or a database.
What kind of data do you need to store?
For structured data, use either preferences (for key-value data) or a database
(for data that contains more than 2 columns).

Should the data be private to your app?


• When storing sensitive data—data that shouldn't be accessible from any other
app—use internal storage, preferences, or a database.
• Internal storage has the added benefit of the data being hidden from users.

Shared Preferences vs Saved Instance State:


Chapter 5
Start Services Lifecycle:
Bound Services Diagram:
Chapter 6
De ne a Sensor:

• A converter that measures a physical quantity and converts it into a signal,


which can be read by an observer or by an instrument.
• Sensor can be used in cell phones like: Microphone, Number keys.

What are Android sensors?

Android sensors are virtual devices that provide data coming from a set of
physical sensors:
• accelerometers - vibration, or acceleration of motion
• gyroscopes - orientation and angular velocity
• magnetometers - magnetic field
• barometer - atmospheric pressure
• humidity,
• pressure,
• light,
• proximity,
• heart rate sensors.
fi
Android Sensors Categories:

The Android platform supports three broad categories of sensors:


• Motion sensors: These sensors measure acceleration forces and rotational
forces along three axes. This category includes accelerometers, gravity,
gyroscopes, and rotational vector sensors.

• Environmental sensors: These sensors measure various environmental


parameters, such as ambient air temperature and pressure, illumination, and
humidity. This category includes barometers, photometers, and thermometers.

• Position sensors: These sensors measure the physical position of a device.


This category includes orientation sensors and magnetometers.

Chapter 7
Explain the Types of Android Location Access:

• Foreground Location: For apps with one-time or time-limited location


sharing, like turn-by-turn directions in a navigation app or sharing current
location in a messaging app, foreground location access is needed.

• Background Location: For continuous location sharing or use of the


Geofencing API, background location access is necessary in the app.
Examples include a family location-sharing app enabling continuous location
sharing and an IoT app allowing users to automate home devices based on
their location.
How to Determine Phone Location:

• The Global Positioning System (GPS) is a U.S.-owned utility that provides


users with positioning, navigation, and timing (PNT) services.

• This system consists of three segments: the space segment, the control
segment, and the user segment.

• The GPS space segment consists of a constellation of satellites (at least 24


operational GPS satellites) transmitting radio signals to users.

• The GPS control segment consists of a global network of ground facilities


that track the GPS satellites, monitor their transmissions, perform analyses,
and send commands and data to the constellation.

• The GPS user segment consists of the GPS receiver equipment, which
receives the signals from the satellites and uses the transmitted information to
calculate the users three- dimensional position and time.


Location Based Services:

• A location-based service (LBS) is an information dissemination system that


can be accessed by mobile devices through the mobile network. It is driven
by the ability of the system to detect the geographical position of the mobile
device.

• One of the unique features of mobile applications is location awareness.


Mobile users take their devices with them everywhere, and adding location
awareness to your app offers users a more contextual experience.

Location Based Services are used in a variety of situations, such as


• Commercial
• Entertainment
• Emergency
• Health
• Work
• personal life, etc.

Examples:
• Locate the nearest bank, restaurant, gas station, hotel, golf course, hospital,
police station, etc.
• Provide transportation information on how to go from ‘here’ to ‘there’.
• Social networking is used to locate and reach events, friends and family
members.

You might also like