Mobile Applications
Mobile Applications
1. Platform-Specific: Mobile apps are developed for specific operating systems, such as
iOS (Apple devices) or Android. Some apps may also be cross-platform, designed to run
on multiple operating systems.
2. Download and Installation: Users can download mobile apps from app stores or other
authorized distribution channels. The installation process varies depending on the
mobile operating system.
3. Mobile-Friendly Interface: Mobile apps are optimized for smaller screens and touch
interfaces, providing a user-friendly experience on smartphones and tablets.
4. Utilization of Device Features: Mobile apps often make use of the built-in features of
mobile devices, such as cameras, GPS, accelerometers, and sensors, to enhance
functionality and user experience.
5. Offline and Online Functionality: Some mobile apps can function offline, while others
require an internet connection for certain features or content.
1
1. Communication:
Messaging Apps: Apps like WhatsApp, Facebook Messenger, and Telegram
facilitate text, voice, and video communication.
Email Clients: Mobile apps for accessing and managing email accounts, such as
Gmail and Outlook.
2. Social Networking:
Social Media Platforms: Apps like Facebook, Instagram, Twitter, and LinkedIn
connect people and allow them to share updates, photos, and videos.
3. Productivity:
Office Suites: Apps like Microsoft Office, Google Workspace, and Apple iWork
provide productivity tools for document creation, editing, and collaboration.
Task Management: Apps like Todoist, Trello, and Microsoft To Do help users
organize and manage tasks.
4. Entertainment:
Gaming: Mobile games cover a wide range of genres, from casual games to
complex multiplayer experiences.
Multimedia: Apps for streaming music (Spotify, Apple Music), videos (YouTube,
Netflix), and podcasts.
5. Utilities:
Weather Apps: Provide real-time weather forecasts and updates.
Navigation: GPS and mapping apps like Google Maps and Waze for navigation
and directions.
Flashlights, calculators, and other utility tools.
6. E-commerce:
Online Shopping: Apps for e-commerce platforms such as Amazon, eBay, and
Alibaba.
Banking and Finance: Mobile banking apps for managing finances, transferring
funds, and making payments.
7. Health and Fitness:
Fitness Tracking: Apps like Fitbit and MyFitnessPal for tracking physical activity,
diet, and health metrics.
Health Information: Apps providing health-related information, symptom
checkers, and medication reminders.
8. Education:
Learning Platforms: Apps like Duolingo, Khan Academy, and Coursera for
educational content and courses.
E-book Readers: Apps for reading digital books, such as Kindle and Apple Books.
9. News and Information:
2
News Aggregators: Apps delivering news updates and articles, such as Flipboard
and Google News.
Reference: Apps providing encyclopedic information or specialized knowledge.
10. Travel and Hospitality:
Booking Platforms: Apps for booking flights (Skyscanner), accommodations
(Booking.com), and transportation (Uber, Lyft).
MOBILE ARCHITECTURE:
Presentation Layer
The aim of this layer is to look into how to present the application to end users.
When designing this layer, the mobile app developers must identify the correct
client type for intended infrastructure. Additionally, the client’s deployment
restrictions must also be kept in mind. Another necessity is selecting the correct
data format and using robust data validation mechanisms for protecting the apps
from invalid entry.
3
Business Layer
This layer looks into elements on the business front. In layman words, it looks into
the way businesses are presented to the end users. This consists of business
components, workflow, and the entities under two sub-layer hood: Domain model
and Service.
The service layer looks into the definition of common application function set that
are available to the end users. While the domain model layer looks into the
knowledge and expertise linked to specific problem areas.
Data Layer
The data access layer must meet the application requirements and should help in
offering efficient and secure data transactions. Mobile app developers should also
consider the maintenance side of the data while ensuring that the data layer can be
modified easily with the changing business requirements.
This layer consists of the data specific components such as access components,
utilities, helpers, and the service agents.
The three elements of mobile architecture patterns are placed under two subheads:
Persistence Layer and Network Layer. The former offers simplified data access
which is stored in the mobile app backend architecture, the latter is needed for
making networking calls.
The intent of everything you have read till now is to not just understand what is
architecture but ‘What is a Good Mobile App Architecture’. Now, what makes an
architecture a good architecture is the principle set it is based on.
There are several types of mobile devices, each designed to cater to specific needs and
preferences. The most common types of mobile devices include:
1. Smartphones: These are the most widely used mobile devices, featuring advanced
computing capabilities, touchscreens, and support for various applications. Examples
include the iPhone, Samsung Galaxy, Google Pixel, and others.
2. Feature Phones: Unlike smartphones, feature phones have limited computing
capabilities and often focus on basic communication functions, such as calling and
texting. They may have physical keyboards and smaller screens.
3. Tablets: Tablets are larger mobile devices with touchscreen interfaces, designed for
tasks such as browsing the internet, reading e-books, watching videos, and running
applications. Examples include the iPad, Samsung Galaxy Tab, and Amazon Fire tablets.
4
4. Wearables: These devices are worn on the body and typically include features such as
fitness tracking, heart rate monitoring, and notifications. Examples include smartwatches
(e.g., Apple Watch, Samsung Galaxy Watch) and fitness trackers (e.g., Fitbit, Garmin).
5. Laptops and 2-in-1 Devices: While not traditionally considered mobile devices, laptops
and 2-in-1 devices (devices that can function as both a laptop and a tablet) are designed
for on-the-go computing. Examples include MacBook, Dell XPS, and Microsoft Surface
devices.
6. E-Readers: Dedicated devices for reading digital books (e-books). Examples include the
Amazon Kindle and Barnes & Noble Nook.
7. Gaming Consoles: While not strictly "mobile," portable gaming consoles like the
Nintendo Switch offer a mobile gaming experience. These devices are designed
specifically for playing video games on the go.
8. Smart Cameras: Some digital cameras have mobile capabilities, allowing users to
connect to the internet, share photos wirelessly, and even run apps. Examples include
the Sony RX100 series and Canon PowerShot G7 X Mark III.
9. Vehicle Infotainment Systems: Modern vehicles often come equipped with mobile-like
interfaces for entertainment, navigation, and communication.
10. Smart Glasses: These wearable devices incorporate a display into eyeglasses, providing
information and augmented reality experiences. Examples include Google Glass and
Microsoft HoloLens.
5
Choose the mobile operating systems you want to target (e.g., iOS,
Android).
3. Design:
Create wireframes and prototypes to visualize the app's structure and user
interface.
Design the user experience (UX) and user interface (UI) to ensure a user-
friendly and visually appealing app.
4. Development:
Select the appropriate development tools, programming languages, and
frameworks based on your chosen platform(s).
Native iOS apps are typically developed using Swift or Objective-C, while
native Android apps are usually built with Java or Kotlin.
Cross-platform frameworks like React Native, Flutter, or Xamarin allow you
to write code once and deploy it on multiple platforms.
5. Coding:
Write the actual code for your mobile app, following the design and
functionality specifications.
Implement features and integrate with external services or APIs if necessary.
6. Testing:
Conduct thorough testing to identify and fix bugs and ensure the app
functions as intended.
Perform unit testing, integration testing, and user acceptance testing.
7. Deployment:
Prepare the app for release by creating developer accounts on relevant app
stores (e.g., Apple App Store, Google Play Store).
Follow the submission guidelines of each app store and submit your app for
review.
8. Marketing and Promotion:
Develop a marketing strategy to promote your app and attract users.
Utilize social media, online advertising, and other channels to increase
visibility.
9. Maintenance and Updates:
Monitor user feedback and address any issues or concerns promptly.
6
Release regular updates to add new features, improve performance, and fix
bugs.
10. Analytics and Optimization:
Implement analytics tools to gather data on user behavior and app
performance.
Use this data to make informed decisions for optimizing the app and
improving user engagement.
Requirement Gathering:
1. Stakeholder Meetings:
Conduct meetings with key stakeholders, including clients, product owners,
and end-users, to gather their expectations and requirements.
2. Define Project Scope:
Clearly define the scope of the mobile app by outlining its features,
functionalities, and limitations.
Document any specific platforms or devices the app should support (iOS,
Android, tablets, etc.).
3. User Personas:
Create user personas to understand the target audience, their needs, and how
they will interact with the app.
4. Market Research:
Research existing apps in the same domain to identify trends, user
expectations, and potential unique selling points for your app.
5. Use Cases and User Stories:
Develop detailed use cases and user stories to describe how users will
navigate through the app and achieve their goals.
7
6. Wireframes and Prototypes:
Create wireframes and prototypes to visualize the app's layout and flow,
helping stakeholders better understand the design and functionality.
7. Functional and Non-functional Requirements:
Document both functional requirements (what the app should do) and non-
functional requirements (performance, security, scalability).
8. Technical Requirements:
Specify any technical constraints, such as integration with third-party APIs,
databases, or specific development frameworks.
9. Regulatory and Compliance Requirements:
Identify any legal or compliance requirements relevant to the app, such as
data protection laws or industry-specific regulations.
Requirement Validation:
1. Review and Feedback:
Share the gathered requirements with stakeholders and seek their feedback.
Address any discrepancies, clarify ambiguities, and make necessary
adjustments based on input.
2. Prototyping Validation:
Validate the app's prototypes with end-users to ensure that the design and
user experience align with their expectations.
Gather feedback on usability and make iterative improvements.
3. Feasibility Study:
Assess the technical and financial feasibility of implementing the identified
features and functionalities within the given constraints.
4. Risk Analysis:
Identify potential risks associated with the requirements and devise
strategies to mitigate them.
5. Prioritization:
Prioritize features based on their importance and impact on the overall
success of the mobile app.
Consider a phased approach for development if there are constraints on time
or resources.
8
6. Documentation:
Update and maintain a comprehensive requirements document that serves as
a reference throughout the development process.
7. Communication:
Maintain open communication channels with stakeholders to keep them
informed of any changes or updates to the requirements.
8. Validation Testing:
Conduct validation testing during the development process to ensure that
implemented features meet the specified requirements.
Verification:
Definition: Verification is the process of evaluating a system or component during
various stages of development to ensure that each work product (e.g., requirements,
design, code) adheres to the specified requirements and standards. It involves
activities that confirm whether the products of a given development phase fulfill the
requirements established during the previous phase.
Key Aspects:
9
Validation:
Definition: Validation is the process of evaluating a system or component during or
at the end of the development process to determine whether it satisfies the specified
requirements and meets the needs of the end-users. Unlike verification, which is
concerned with the correctness of the development process, validation is concerned
with the final product's behavior in the real-world environment.
Key Aspects:
1. Focus on Product: Validation primarily focuses on the end product and its actual
behavior in the intended environment.
2. Objective: To ensure that the software meets the user's expectations and functions as
intended in real-world scenarios.
3. Examples:
Functional validation: Testing the software to ensure that it performs the
functions specified in the requirements.
User acceptance testing (UAT): Allowing end-users to test the software to
ensure it meets their needs.
Performance testing: Evaluating the software's responsiveness, speed, and
overall performance under different conditions.
Relationship:
Iterative Process: Both verification and validation are iterative processes that occur
throughout the entire software development life cycle.
Complementary Roles: Verification and validation are complementary and often
performed simultaneously, but they focus on different aspects of the development
process and the product.
This diagram represents the interactions and relationships between the three
components: Model, View, and Controller.
10
|----------------------| |-----------------------| |-----------------------|
| | UI | | | |
| | | Application Logic | | |
| | | | | |
1. Model:
Definition: The Model represents the application's data and business logic. It is
responsible for managing the data, processing business rules, and responding to queries
from the View or instructions from the Controller.
Key Characteristics:
Encapsulates data and business logic.
Provides an interface for data manipulation and retrieval.
Notifies registered observers (Views) about changes in the data.
2. View:
Definition: The View is responsible for presenting the data to the user and receiving
user input. It displays the information from the Model and sends user commands (such
as button clicks or menu selections) to the Controller for processing.
Key Characteristics:
Displays the data to the user in a visually understandable format.
Receives and interprets user inputs.
Passes user commands to the Controller for further action.
Should not contain business logic; it's focused on the presentation layer.
3. Controller:
Definition: The Controller acts as an intermediary between the Model and the View. It
receives user input from the View, processes it (potentially interacting with the Model),
and updates the View accordingly. It plays a key role in managing the flow of data and
application logic.
Key Characteristics:
Receives user inputs from the View.
Interacts with the Model to update data or retrieve information.
Updates the View based on changes in the Model.
Contains application logic and orchestration.
11
MVC Workflow:
1. User Action:
The user interacts with the View, such as clicking a button or entering data.
2. View Notifies Controller:
The View notifies the Controller of the user's action.
3. Controller Processes Input:
The Controller processes the input, potentially interacting with the Model to update data
or retrieve information.
4. Model Notifies View:
If the data in the Model changes, the Model notifies the registered Views about the
update.
5. View Updates Display:
The View updates its display based on the changes in the Model.
Benefits of MVC:
1. Separation of Concerns:
Each component has a specific responsibility, making the code more modular and easier
to understand.
2. Code Reusability:
The separation of concerns allows for the reuse of Models and Views in different parts of
the application.
3. Maintainability:
Changes to one component (Model, View, or Controller) do not necessarily affect the
others, making it easier to maintain and extend the application.
4. Testability:
Components can be tested independently, facilitating the creation of unit tests for the
Model, View, and Controller.
5. Flexibility and Extensibility:
The pattern supports the introduction of new Views or Controllers without significant
changes to the existing codebase.
1. Smartphone Penetration:
12
The widespread adoption of smartphones is a fundamental driver. As more
people own smartphones, the potential user base for mobile applications
expands.
2. Mobile Internet Accessibility:
Improved access to high-speed mobile internet, including 4G and 5G
networks, enhances the user experience and encourages increased usage of
mobile applications.
3. Technological Advancements:
Continuous advancements in mobile technology, including hardware
capabilities and software frameworks, enable the development of more
sophisticated and feature-rich applications.
13
Diverse monetization models, including freemium, in-app purchases,
subscriptions, and ads, enable developers to generate revenue and sustain
their businesses.
10. Data Security and Privacy Concerns:
Growing awareness of data security and privacy issues drives the
development of secure mobile applications. Compliance with regulations
such as GDPR and user trust are crucial for success.
11. Mobile Gaming Industry:
The gaming sector, with its high engagement levels and revenue potential,
continues to be a major driver in the mobile application market.
12. Business and Productivity Apps:
Increased demand for mobile applications that enhance productivity,
collaboration, and business processes, especially with the rise of remote
work.
13. Health and Wellness Apps:
The focus on health and wellness has led to the popularity of fitness apps,
mental health apps, and other applications that support well-being.
14. Augmented Reality (AR) and Virtual Reality (VR):
The integration of AR and VR technologies in mobile applications provides
immersive experiences in gaming, education, retail, and other industries.
15. Global App Localization:
The need for apps to cater to diverse linguistic and cultural preferences
drives the localization of applications for different regions and markets.
14
or deployment of mobile applications. These drivers are often strategic and aligned
with business goals. Here are key business drivers in mobile application
development:
15
Mobile apps can serve as a platform for delivering excellent customer
service through features such as in-app chat support, FAQs, and self-service
options.
10. Adaptation to Mobile-First Trends:
With the increasing use of smartphones, businesses need to adapt to mobile-
first trends to reach and engage a large audience that prefers mobile devices
for various activities.
11. Market Expansion:
Mobile apps provide an avenue for businesses to expand their market reach
beyond geographic constraints. They can tap into global markets and cater to
diverse customer segments.
12. Integration with Ecosystem:
Developing mobile apps that seamlessly integrate with other products or
services within the organization's ecosystem can enhance overall user
experience and satisfaction.
13. Innovation and Differentiation:
Mobile apps allow businesses to innovate and differentiate themselves by
introducing new features, services, or technologies that meet evolving
customer needs.
14. Employee Productivity:
Internal mobile apps can improve employee productivity by providing tools
for communication, collaboration, and task management.
15. Compliance and Security:
Developing secure mobile apps helps businesses comply with data
protection regulations and build trust among users concerned about privacy
and security.
16
1. App Store Distribution:
Mobile applications are typically distributed through official app stores such as
the Apple App Store (for iOS devices) and Google Play Store (for Android
devices). Publishing on these platforms ensures visibility and accessibility to a
broad user base.
2. Global Reach:
App stores provide a centralized and global distribution platform, allowing
developers to reach users around the world. This global reach is crucial for
maximizing the app's potential user base.
3. Credibility and Trust:
Apps available on official app stores are perceived as more credible and
trustworthy by users. The review and approval processes conducted by app store
administrators contribute to the overall quality and security of the app
ecosystem.
4. Monetization Opportunities:
Publishing through app stores provides various monetization options, including
selling the app, offering in-app purchases, displaying ads, or implementing
subscription models. This allows developers to generate revenue from their
applications.
5. Automatic Updates:
App stores facilitate the distribution of updates to users seamlessly. Users are
notified of available updates, and they can easily install the latest version of the
app. This ensures that users have access to new features, bug fixes, and security
patches.
6. App Discovery:
App stores offer a platform for users to discover new applications through
curated lists, recommendations, and search functionalities. Effective publishing
strategies enhance the visibility of an app, increasing the likelihood of discovery
by potential users.
7. User Reviews and Feedback:
Users can leave reviews and ratings on app stores, providing valuable feedback to
developers and influencing potential users. Positive reviews contribute to an
app's credibility, while negative reviews highlight areas for improvement.
8. Platform Guidelines and Policies:
App stores have guidelines and policies that developers must adhere to during
the publishing process. This ensures a standardized and secure user experience,
as well as compliance with legal and ethical standards.
9. Security and Privacy Compliance:
17
App store review processes include checks for security vulnerabilities and
adherence to privacy policies. This helps in maintaining a secure environment for
users and ensures that apps meet regulatory requirements.
10. Promotional Opportunities:
App stores often provide promotional opportunities, such as featured app
sections, to highlight selected applications. Being featured can significantly
increase an app's visibility and downloads.
11. Ease of Installation:
Users can easily discover, download, and install apps directly from the app store,
simplifying the installation process. This convenience encourages users to explore
and try new applications.
12. Analytics and User Engagement:
App stores offer analytics tools that provide developers with insights into user
engagement, downloads, and other relevant metrics. This data helps developers
make informed decisions about app improvements and marketing strategies.
The delivery of a mobile application involves the process of making the application
available to end-users. This typically includes submitting the app to the respective app
stores, managing the release process, and ensuring a smooth distribution and
installation experience for users. Here is a step-by-step demonstration of the delivery
process for a mobile application:
18
3. App Store Registration:
If not done already, register for developer accounts on the relevant app stores, such as
the Apple App Store for iOS and the Google Play Store for Android.
19
11. Release Approval:
Upon successful review, the app store will approve the release, making the mobile
application available for download to users.
By following these steps, you can effectively deliver a mobile application to users,
ensuring a positive and seamless experience from development to distribution.
EMBEDDED SYSTEM
An embedded system is a combination of computer hardware and software designed
for a specific function. Embedded systems may also function within a larger system.
The systems can be programmable or have a fixed functionality. Industrial machines,
consumer electronics, agricultural and processing industry devices, automobiles,
medical equipment, cameras, digital watches, household appliances, airplanes,
20
vending machines and toys, as well as mobile devices, are possible locations for an
embedded system.
While embedded systems are computing systems, they can range from having no user
interface (UI) -- for example, on devices designed to perform a single task -- to
complex graphical user interfaces (GUIs), such as in mobile devices. User interfaces
can include buttons, LEDs (light-emitting diodes) and touchscreen sensing. Some
systems use remote user interfaces as well.
21
Industrial machines. They can contain embedded systems, like sensors, and can
be embedded systems themselves. Industrial machines often have embedded
automation systems that perform specific monitoring and control functions.
Medical equipment. These may contain embedded systems like sensors and
control mechanisms. Medical equipment, such as industrial machines, also must be
very user-friendly so that human health isn't jeopardized by preventable machine
mistakes. This means they'll often include a more complex OS and GUI designed
for an appropriate UI.
can be embedded in a larger system to perform a specific function, as they are built
for specialized tasks within the system, not various tasks;
are often used for sensing and real-time computing in internet of things (IoT)
devices, which are devices that are internet-connected and do not require a user to
operate;
can vary in complexity and in function, which affects the type of software,
firmware and hardware they use; and
are often required to perform their function under a time constraint to keep the
larger system functioning properly.
22
Hardware. The hardware of embedded systems is based around microprocessors
and microcontrollers. Microprocessors are very similar to microcontrollers and,
typically, refer to a CPU (central processing unit) that is integrated with other
basic computing components such as memory chips and digital signal processors
(DSPs). Microcontrollers have those components built into one chip.
Software and firmware. Software for embedded systems can vary in complexity.
However, industrial-grade microcontrollers and embedded IoT systems usually run
very simple software that requires little memory.
Digital-to-analog (D-A) converters change the digital data from the processor
into analog data.
Actuators compare actual output to memory-stored output and choose the correct
one.
The sensor reads external inputs, the converters make that input readable to the
processor, and the processor turns that information into useful output for the
embedded system.
23
24
A diagram
of the basic structure and flow of information in embedded systems.
Standalone embedded systems are not reliant on a host system. Like any
embedded system, they perform a specialized task. However, they do not
necessarily belong to a host system, unlike other embedded systems. A calculator
or MP3 player is an example of this.
Real-time embedded systems give the required output in a defined time interval.
They are often used in medical, industrial and military sectors because they are
responsible for time-critical tasks. A traffic control system is an example of this.
How does an embedded system work?
Embedded systems always function as part of a complete device -- that's what's meant
by the term embedded. They are low-cost, low-power-consuming, small
25
computers that are embedded in other mechanical or electrical systems. Generally,
they comprise a processor, power supply, and memory and communication ports.
Embedded systems use the communication ports to transmit data between the
processor and peripheral devices -- often, other embedded systems -- using a
communication protocol. The processor interprets this data with the help of minimal
software stored on the memory. The software is usually highly specific to the function
that the embedded system serves.
Often, embedded systems are used in real-time operating environments and use a real-
time operating system (RTOS) to communicate with the hardware. Near-real-time
approaches are suitable at higher levels of chip capability, defined by designers who
have increasingly decided the systems are generally fast enough and the tasks tolerant
of slight variations in reaction. In these instances, stripped-down versions of
the Linux operating system are commonly deployed, although other OSes have been
pared down to run on embedded systems, including Embedded Java and Windows IoT
(formerly Windows Embedded).
Emulators are used to emulate the Simulators are used to simulate the
Used For software and hardware features of a behavior and configuration of a real
real device; suitable for debugging device; less reliable for debugging
Binary translation makes them perform Does not have binary translation and
Performance
slower due to latency performs faster
Android SDK; The Android emulator iOS Simulator; The iOS simulator
Example
abstracts hardware differences abstracts platform differences
27
RTOS, or Real-Time Operating System, is an operating system designed to meet the
specific requirements of real-time systems, where the correctness of the system's
behavior depends on the timeliness of its responses. Here's a brief summary of RTOS
with an example:
28
UNIT-2
WHAT IS EMBEDDED OPERATING SYSTEM?
An embedded operating system is essentially the brain of an embedded computer
system, which defines the functionality of a product. It is engineered and optimized
to improve the efficiency of controlling the hardware resources, drive graphics
processing, and decrease response time for the tasks performed by the device. In
this article, we will expand upon this embedded OS definition with examples, and
shed light on the ins and outs of embedded operating systems, which can be found
in almost all smart devices today.
In today’s digital era, most vehicles, appliances, and handheld devices need
embedded operating systems to control functionality and perform tasks efficiency.
Instead of controlling each part of the system individually, an embedded OS
manages all programmable as well as fixed hardware operations. Though these
systems have taken the electronic world by storm today, people are still unaware of
what they can bring to the table. Let's dive into our discussion of embedded
computer operating systems.
29
Embedded Operating Systems: The Basics
An embedded operating system is a small-scale computer of an embedded system
with a limited number of features. It is designed to carry out a function or a set of
functions of an electronic end product. Akin to a desktop PC that requires an OS
like Windows, Linux, or Mac OS to run basic apps, embedded systems also need
an operating system to facilitate and expedite their functionality.
For instance, all mobile phones have an integrated embedded operating system
software like Android or iOS that starts up when the phone is switched on. Without
the OS, implementing an app into every single mobile phone with different
hardware would have been a nightmare for developers. It allows them to bridge all
the gaps and build a unified app specifically for the OS. The embedded operating
system is also known as a real-time operating system (RTOS) in some cases, which
we will discuss in another section.
30
Here are some common characteristics of an embedded OS:
Power efficient
Fewer storage capabilities
Smaller processing power
Fast and lightweight
I/O device flexibility
Real-time operation
Tailored to the intended use case
31
Navigation system of an airplane
A plane’s navigation system is an excellent example of a real time operating
system. The main computer of an airplane that is interconnected with most of the
control systems like engine, wing, safety, and pressure controls. So, it is
specifically designed to operate inside a plane and help perform operations like
takeoff, landing, and emergencies.
Medical equipment
Medical equipment integrated with embedded operating systems automatically
monitors bio constants, administers medications, and sends alerts to the staff in
case the bio constants go above or below the threshold value. Thus, medical
equipment can help doctors treat their patients, monitor their health, and save their
lives.
Airbags in our vehicles are the best example of this concept. When a speeding car
gets into an accident, airbags must deploy within 10-20 milliseconds of the crash.
32
A delay of even a few milliseconds may cause death. So, there is no margin of
error, and the task should be carried out immediately.
Embedded Systems:
1. Definition:
Embedded System: An embedded system is a computing device that is
dedicated to performing a specific set of functions within a larger system or
33
product. It is often a combination of hardware and software designed to
carry out a particular task or set of tasks.
2. Scope:
Embedded System: Encompasses the entire computing system, including
hardware components (such as microcontrollers, sensors, and actuators) and
software components (embedded software applications).
3. Functionality:
Embedded System: Designed to provide dedicated functionality, and it is
typically optimized for a specific task. Examples include control systems in
automotive applications, industrial automation, consumer electronics, and
medical devices.
4. Autonomy:
Embedded System: Can operate independently without direct human
intervention. It is often integrated into a larger product or system, and its
functionality is predefined.
5. Examples:
Embedded System: A digital thermostat in a home HVAC system, the
control system in a washing machine, or the navigation system in a car.
Embedded Operating Systems (Embedded OS):
1. Definition:
Embedded OS: An embedded operating system is a specialized operating
system designed to run on embedded systems. It provides essential services
such as task scheduling, memory management, and communication between
software components.
2. Scope:
Embedded OS: Focuses specifically on the software layer of an embedded
system. It is responsible for managing hardware resources, enabling
communication between different software modules, and providing a
runtime environment for applications.
3. Functionality:
Embedded OS: Aims to provide a platform for the execution of embedded
software applications. It includes features tailored for resource-constrained
environments, real-time operation, and efficient task management.
4. Autonomy:
Embedded OS: Operates in the background, facilitating the execution of
embedded applications. It is responsible for managing system resources and
ensuring that the embedded software functions correctly.
5. Examples:
34
Embedded OS: FreeRTOS, VxWorks, Embedded Linux, and Micrium are
examples of embedded operating systems. These systems provide the
necessary infrastructure for running applications on embedded devices.
Comparison:
1. Scope:
Embedded System: Encompasses both hardware and software components,
representing the complete computing system.
Embedded OS: Focuses specifically on the software layer, providing a
runtime environment for applications.
2. Functionality:
Embedded System: Provides dedicated functionality for a specific task or
set of tasks.
Embedded OS: Manages hardware resources, facilitates communication
between software components, and provides a platform for application
execution.
3. Autonomy:
Embedded System: Operates independently, performing the predefined
functions without constant human intervention.
Embedded OS: Operates in the background, managing resources and
enabling the execution of embedded applications.
4. Examples:
Embedded System: Examples include a variety of devices such as washing
machines, thermostats, and navigation systems.
Embedded OS: Examples include FreeRTOS, VxWorks, and Embedded
Linux.
User interfaces (UIs) in mobile applications can be classified into several types
based on their design, layout, and interaction patterns. Here are various user
interface classifications commonly found in mobile applications:
35
1. Native UI:
Definition: Native UIs are designed following the guidelines and conventions of
the specific platform (iOS or Android).
Characteristics:
Utilizes platform-specific UI components.
Adheres to platform design principles.
Provides a consistent look and feel with other native apps.
2. Web-based UI:
Definition: Web-based UIs are built using web technologies and are often
accessed through a mobile browser.
Characteristics:
HTML, CSS, and JavaScript are commonly used.
Responsive design for various screen sizes.
May not have access to native device features.
3. Hybrid UI:
Definition: Hybrid UIs combine elements of both native and web-based UIs,
typically using a web view within a native app.
Characteristics:
Allows cross-platform development using web technologies.
Access to native features through plugins.
May not provide the same performance as fully native UIs.
4. Flat Design:
Definition: Flat design is a minimalistic design approach, emphasizing simplicity,
clean lines, and a focus on usability.
Characteristics:
Minimal use of gradients, shadows, and textures.
Bold colors and typography.
Common in both native and web-based UIs.
5. Material Design:
Definition: Material Design is a design language introduced by Google,
characterized by a flat design with subtle use of shadows and depth.
Characteristics:
36
Responsive animations and transitions.
Card-based layouts.
Intuitive navigation and consistent UI elements.
6. Skeuomorphic Design:
Definition: Skeuomorphic design replicates real-world objects, textures, and
effects to make the UI resemble physical objects.
Characteristics:
Use of realistic textures, shadows, and gradients.
Aims to create a familiar and intuitive experience.
Less common in modern mobile UIs.
7. Gesture-Based UI:
Definition: Gesture-based UIs rely on touch gestures (swipes, pinches, taps) for
user interaction.
Characteristics:
Intuitive and natural interactions.
Common in mobile gaming and navigation.
Requires user education for less common gestures.
37
10. Adaptive UI:
Definition: Adaptive UIs dynamically adjust their layout and design based on
factors such as screen size, orientation, and device capabilities.
Characteristics:
Ensures optimal user experience across various devices.
Responsive to changes in the device's environment.
Common in responsive web design and some native apps.
Touch events and gestures play a crucial role in enhancing the user experience of
mobile applications. These interactions allow users to navigate, interact, and
manipulate content on touch-enabled devices.
Touch Events:
1. Touch Start:
Fired when a touch point is placed on the touch surface.
Typically used to initiate actions or capture the starting point of a gesture.
2. Touch Move:
Fired repeatedly as the touch point is moved across the touch surface.
Useful for tracking the movement of a finger or stylus.
3. Touch End:
Fired when the touch point is removed from the touch surface.
Often used to trigger actions or animations upon touch release.
4. Touch Cancel:
Fired when a touch event is interrupted or canceled by the system.
Useful for handling unexpected interruptions.
Common Gestures:
1. Tap:
A quick touch and release.
Commonly used for selecting items or triggering actions.
2. Double Tap:
38
Two quick taps in succession.
Can be used for various actions, like zooming or opening a detailed view.
3. Long Press:
Holding a touch point for an extended period without moving.
Often used to reveal context menus or initiate drag-and-drop.
4. Swipe:
Moving a finger in a specific direction quickly.
Commonly used for navigation between screens or scrolling through
content.
5. Pinch and Spread (Zoom):
Pinching fingers together or spreading them apart.
Used for zooming in and out of maps, images, or other scalable content.
6. Rotate:
Rotating two fingers around a central point.
Useful for manipulating objects with rotational properties.
7. Drag and Drop:
Pressing and moving an item to a different location.
Enables users to rearrange items or move them between screens.
Overview
Swiping in a direction
Double tapping for zooming
Pinch to zoom in or out
Dragging and dropping
Effects while scrolling a list
Usage
Handling Touches
At the heart of all gestures is the onTouchListener and the onTouch method which
has access to MotionEvent data. Every view has an onTouchListener which can be
specified:
39
myView.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// Interpret MotionEvent data
return true;
}
});
Each onTouch event has access to the MotionEvent which describe movements in
terms of an action code and a set of axis values. The action code specifies the
state change that occurred such as a pointer going down or up. The axis values
describe the position and other movement properties:
Note that every touch event can be propagated through the entire affected view
hierarchy. Not only can the touched view respond to the event but every layout
that contains the view has an opportunity as well. Refer to the understanding touch
events section for a detailed overview.
Note that getAction() normally includes information about both the action as well
as the pointer index. In single-touch events, there is only one pointer (set to 0), so
no bitmap mask is needed. In multiple touch events (i.e pinch open or pinch close),
however, there are multiple fingers involved and a non-zero pointer index may be
included when calling getAction(). As a result, there are other methods that should
be used to determine the touch event:
40
The events associated with other pointers usually start
with MotionEvent.ACTION_POINTER such
as MotionEvent.ACTION_POINTER_DOWN and MotionEvent.ACTION_POINT
ER_UP. The getPointerCount() on the MotionEvent can be used to determine how
many pointers are active in this touch sequence.
Gesture Detectors
Double Tapping
You can enable double tap events for any view within your activity using
the OnDoubleTapListener. First, copy the code for OnDoubleTapListener into your
application and then you can apply the listener with:
myView.setOnTouchListener(new OnDoubleTapListener(this) {
@Override
public void onDoubleTap(MotionEvent e) {
Toast.makeText(MainActivity.this, "Double Tap",
Toast.LENGTH_SHORT).show();
}
});
Now that view will be able to respond to a double tap event and you can handle the
event accordingly.
Detecting finger swipes in a particular direction is best done using the built-
in onFling event in the GestureDetector.OnGestureListener.
A helper class that makes handling swipes as easy as possible can be found in
the OnSwipeTouchListener class. Copy the OnSwipeTouchListener class to your
own application and then you can use the listener to manage the swipe events with:
myView.setOnTouchListener(new OnSwipeTouchListener(this) {
41
@Override
public void onSwipeDown() {
Toast.makeText(MainActivity.this, "Down", Toast.LENGTH_SHORT).show();
}
@Override
public void onSwipeLeft() {
Toast.makeText(MainActivity.this, "Left", Toast.LENGTH_SHORT).show();
}
@Override
public void onSwipeUp() {
Toast.makeText(MainActivity.this, "Up", Toast.LENGTH_SHORT).show();
}
@Override
public void onSwipeRight() {
Toast.makeText(MainActivity.this, "Right", Toast.LENGTH_SHORT).show();
}
});
If you are interested in having a ListView that recognizes swipe gestures for each
item, consider using the popular third-party library android-swipelistview which is
a ListView replacement that supports swipe-eable items. Once setup, you can
configure a layout that will appear when the item is swiped.
Check out the swipelistview project for more details but the general usage looks
like:
42
<com.fortysevendeg.swipelistview.SwipeListView
xmlns:swipe="http://schemas.android.com/apk/res-auto"
android:id="@+id/example_lv_list"
android:listSelector="#00000000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
swipe:swipeFrontView="@+id/front"
swipe:swipeBackView="@+id/back"
swipe:swipeActionLeft="reveal"
swipe:swipeActionRight="dismiss"
swipe:swipeMode="both"
swipe:swipeCloseAllItemsWhenMoveList="true"
/>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/back"
android:tag="back"
style="@style/ListBackContent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/example_row_b_action_1"
style="@style/ListButtonAction"
android:text="@string/open"/>
</LinearLayout>
<RelativeLayout
android:orientation="vertical"
android:id="@+id/front"
android:tag="front"
style="@style/ListFrontContent">
<ImageView
style="@style/ListImage"
android:id="@+id/example_row_iv_image"/>
</RelativeLayout>
43
</FrameLayout>
Now front will be displayed by default and if I swipe left on an item, then
the back will be displayed for that item. This simplifies swipes for the common
case of menus for a ListView.
Another more recent alternative is the AndroidSwipeLayout library which can be
more flexible and is worth checking out as an alternative.
Pinch to Zoom
ScaleGestureDetector mScaleDetector =
new ScaleGestureDetector(getContext(), this);
@Override
public boolean onScale(ScaleGestureDetector detector) {
// Code for scale here
return true;
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector) {
// Code for scale begin here
return true;
}
@Override
44
public void onScaleEnd(ScaleGestureDetector detector) {
// Code for scale end here
@Override
public boolean onTouch(View v, MotionEvent event) {
if (mScaleDetector.onTouchEvent(event))
return true;
return super.onTouchEvent(event);
}
}
One of the most common use cases for a pinch or pannable view is for an
ImageView that displays a Photo which can be zoomed or panned around on
screen similar to the Facebook client. To achieve the zooming image view, rather
than developing this yourself, be sure to check out the PhotoView third-party
library. Using the PhotoView just requires the XML:
<uk.co.senab.photoview.PhotoView
android:id="@+id/iv_photo"
android:layout_width="match_parent"
android:layout_height="match_parent" />
mImageView.setImageDrawable(someBitmap);
// Setup view attacher
45
PhotoViewAttacher mAttacher = new PhotoViewAttacher(mImageView);
Check out the PhotoView readme and sample for more details. You can also check
the TouchImageView library which is a nice alternative.
Scrolling Lists
draggableView.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
// Construct draggable shadow for view
46
// Start the drag of the shadow
view.setVisibility(View.INVISIBLE);
return true;
} else {
return false;
}
}
});
viewDropZone.setOnDragListener(new OnDragListener() {
// Drawable for when the draggable enters the drop target
Drawable enteredZoneBackground =
getResources().getDrawable(R.drawable.shape_border_green);
// Drawable for the default background of the drop target
Drawable defaultBackground =
getResources().getDrawable(R.drawable.shape_border_red);
@Override
public boolean onDrag(View v, DragEvent event) {
// Get the dragged view being dropped over a target view
47
break;
case DragEvent.ACTION_DRAG_ENTERED:
// Signals to a View that the drag point has
v.setBackground(enteredZoneBackground);
break;
case DragEvent.ACTION_DRAG_EXITED:
// Signals that the user has moved the drag shadow
v.setBackground(defaultBackground);
break;
case DragEvent.ACTION_DROP:
// Signals to a View that the user has released the drag shadow,
// and the drag point is within the bounding box of the View.
View dropTarget = v;
// Make desired changes to the drop target below
dropTarget.setTag("dropped");
// Get owner of the dragged view and remove the view (if needed)
// If event result is set, this means the dragged view was dropped in target
48
v.setBackground(enteredZoneBackground);
} else { // drop did not occur
draggedView.post(new Runnable() {
@Override
public void run() {
draggedView.setVisibility(View.VISIBLE);
}
});
// restore drop zone default background
v.setBackground(defaultBackground);
}
default:
break;
}
return true;
}
});
1. Performance:
Device Variability: Mobile apps need to perform well across a wide range
of devices with varying hardware specifications. Developers must optimize
49
their applications to run smoothly on different screen sizes, resolutions,
processing powers, and memory capacities.
Network Conditions: Mobile apps often rely on internet connectivity.
Developers need to consider different network conditions, including 3G, 4G,
and Wi-Fi, and optimize the app to function efficiently even in low-
bandwidth situations.
2. Compatibility:
Operating Systems and Versions: Mobile apps need to be compatible with
various operating systems (iOS, Android) and their different versions.
Ensuring compatibility across a broad range of devices and OS versions is
crucial for reaching a larger user base.
Third-party Integrations: Many apps integrate with third-party services or
libraries. Ensuring compatibility with these external components is
important for the overall stability and functionality of the app.
3. Security:
Data Protection: Mobile applications often handle sensitive user data.
Implementing strong security measures to protect this data from
unauthorized access, ensuring secure data transmission, and incorporating
encryption are critical for maintaining user trust.
Authentication and Authorization: Implementing robust authentication
mechanisms and authorization controls is essential to prevent unauthorized
access to user accounts and sensitive information.
4. User Interface (UI) and User Experience (UX):
Consistency: The UI should be consistent across different devices and
screen sizes. Consistency in design elements and navigation helps users
easily understand and interact with the app.
Responsiveness: Mobile apps must respond quickly to user inputs. Slow or
unresponsive interfaces can lead to a poor user experience and negative
reviews.
5. Scalability:
User Base Growth: As the user base grows, the app should be able to
handle increased traffic and data without significant degradation in
performance. Scalability is crucial for the long-term success of mobile
applications.
50
6. Regulatory Compliance:
Data Privacy Laws: Mobile apps need to comply with data protection and
privacy regulations. Ensuring that the app handles user data in accordance
with legal requirements is essential to avoid legal issues.
7. Testing and Debugging:
Diverse Testing Environments: Quality assurance involves testing the app
in various scenarios to identify and address potential issues. Comprehensive
testing across different devices, OS versions, and network conditions is vital.
8. Resource Utilization:
Battery and Storage: Mobile apps should be optimized to minimize battery
consumption and efficiently utilize device storage. This is crucial for
providing a positive user experience and preventing users from uninstalling
the app due to excessive resource usage.
1.Performance:
Definition: Performance in the context of a software application, including
mobile apps, refers to how well the application responds and behaves in
terms of speed, responsiveness, and efficiency.
Factors Affecting Performance:
Load Time: How quickly the app launches and becomes usable.
Responsiveness: The speed at which the app reacts to user inputs.
Resource Utilization: Efficient use of system resources, such as
CPU, memory, and battery.
Importance: Users expect apps to be fast and responsive. Poor performance
can lead to a negative user experience, user frustration, and potential
abandonment of the application.
51
2. Usability:
Definition: Usability refers to how easy and enjoyable it is for users to
interact with and navigate the mobile application.
Factors Affecting Usability:
User Interface (UI) Design: Intuitive and visually appealing design.
Navigation: Logical and easy-to-understand navigation flow.
Consistency: Consistent design elements and interaction patterns.
Accessibility: Ensuring the app is accessible to users with disabilities.
Importance: A highly usable app enhances user satisfaction, encourages
user retention, and promotes positive reviews and recommendations.
3. Security:
Definition: Security involves protecting the app and its users' data from
unauthorized access, breaches, and other security threats.
Factors Affecting Security:
Authentication and Authorization: Robust user authentication and
proper authorization mechanisms.
Data Encryption: Ensuring that sensitive data is encrypted during
transmission and storage.
Secure Coding Practices: Writing code with security considerations
to prevent vulnerabilities.
Importance: Security is paramount to maintain user trust. A breach can
have severe consequences, including loss of user data, damage to the app's
reputation, and legal repercussions.
4. Availability:
Definition: Availability refers to the accessibility and reliability of the
mobile application. An available app should be accessible to users whenever
they need it and should have minimal downtime.
Factors Affecting Availability:
Server Uptime: Ensuring that servers hosting the app are consistently
operational.
Redundancy: Implementing backup systems to mitigate the impact of
potential failures.
Scalability: Designing the app to handle increasing loads without
degradation in performance.
52
Importance: Users expect apps to be available whenever they want to use
them. Downtime or unavailability can lead to frustration and a negative
perception of the app.
5. Modifiability:
Definition: Modifiability refers to the ease with which changes and updates
can be made to the mobile application, including adding new features, fixing
bugs, and making improvements.
Factors Affecting Modifiability:
Code Maintainability: Well-organized and readable code that is easy
to modify.
Modular Design: Breaking down the application into modular
components for easier updates.
Version Control: Using version control systems to manage code
changes.
Importance: As market demands and technology evolve, the ability to
quickly and efficiently make changes to the app is crucial for staying
competitive and meeting user expectations.
Mobile operating systems (Mobile OS) are the software platforms that control
mobile devices such as smartphones and tablets. As of my last knowledge update
in January 2022, several mobile operating systems were prominent in the market.
Keep in mind that the landscape may have evolved since then. Here are
descriptions of some of the major mobile operating systems:
1. Android:
Developed by: Google
53
Open Source: Yes (AOSP - Android Open Source Project)
Customizability: Highly customizable; allows manufacturers to create their
own versions.
App Store: Google Play Store
Notable Features: Widgets, extensive app ecosystem, diverse device support.
2. iOS:
Developed by: Apple
Open Source: No
Customizability: Limited customization options; consistent user interface
across devices.
App Store: Apple App Store
Notable Features: Smooth user experience, tight integration with Apple
ecosystem, security features.
3. Windows Mobile:
Developed by: Microsoft
Open Source: No
Customizability: Moderate customization; known for a tile-based interface.
App Store: Microsoft Store (formerly Windows Phone Store)
Notable Features: Integration with Microsoft services, Live Tiles.
4. BlackBerry OS:
Developed by: BlackBerry (formerly Research In Motion - RIM)
Open Source: No
Customizability: Moderate customization; known for its emphasis on
security.
App Store: BlackBerry World
Notable Features: Focus on security, physical keyboards on some devices.
5. Tizen:
Developed by: Linux Foundation, Samsung, and others
Open Source: Yes
Customizability: Customizable; used in Samsung's smartwatches and some
smartphones.
App Store: Samsung Galaxy Store
Notable Features: Designed for a variety of devices, including smartphones,
smart TVs, and wearables.
54
6. KaiOS:
Developed by: KaiOS Technologies
Open Source: Partially (based on open web technologies)
Customizability: Limited customization; targeted at feature phones and low-
end smartphones.
App Store: KaiStore
Notable Features: Lightweight, optimized for low-resource devices, supports
essential apps.
7. HarmonyOS:
Developed by: Huawei
Open Source: Yes (Kernel source code)
Customizability: Customizable; designed for a seamless experience across
various devices.
App Store: Huawei AppGallery
Notable Features: Cross-device compatibility, distributed technology,
emphasis on IoT.
It's worth noting that the market share and popularity of these mobile operating
systems can change over time, and new operating systems may emerge.
55