Unit1 21CS1702 - Mobile Application Development
Unit1 21CS1702 - Mobile Application Development
Unit1 21CS1702 - Mobile Application Development
UNIT I
INTRODUCTION TO ANDROID OS 9
ndroid: An Open Platform for Mobile Development- Introducing the Open
Handset Alliance- Introducing the Development Framework- Developing
for Android- Developing for Mobile and Embedded Devices- Android
Development Tools- Introducing the Application Manifest File -The
Android Application Lifecycle.
1
available for anyone to use, modify, and distribute.
Benefits:
o Cost-effective
o Community support
o Flexibility and customization
o Transparency
a. Android
• Development Tools:
o Android Studio: Official IDE for Android development.
o Languages: Java, Kotlin.
o Key Features: Emulator, layout editor, APK analyzer, intelligent
code editor.
• Advantages:
2
• Key Features: Single codebase for iOS and Android, customizable
widgets, high-performance rendering engine.
• Advantages:
o Fast development
o High-performance apps
o Growing community
c. React Native
• Overview: A JavaScript framework for writing real, natively rendering mobile applications
for iOS and Android.
• Development Tools:
o JavaScript/TypeScript: Programming languages used.
o Expo: Set of tools and services for building React Native apps.
• Key Features: Reusable components, fast refresh, vast ecosystem.
• Advantages:
o Single codebase for multiple platforms
o Strong community and library support
o Backed by Facebook
d. Ionic
3
6. Challenges in Mobile Development
4
WHAT DOES ANDROID RUN ON?
5
The increasing popularity of modern smartphones,
combined with the increasing availability of high-speed
mobile data and Wi-Fi hotspots, has created a huge
opportunity for advanced mobile applications.
6
being used or while your mobile sits ignored until it
rings, flashes, or vibrates to get your attention.
7
the Android run time, which stops and kills processes as
necessary to manage resources.
9
forums of Android developers with regular input from
the Android engineering and developer relations teams
at Google. Stack Overflow
(www.stackoverflow.com/questions/tagged/android) is
also a hugely popular destination for Android questions
and a great place to find answers to beginner questions.
10
abstraction layer between the hardware and the
remainder of the stack.
11
Dalvik VM — Dalvik is a register-based Virtual
Machine that’s been optimized to ensure that a device
can run multiple instances efficiently. It relies on the
Linux kernel for threading and low-level memory
management.
12
The Dalvik Virtual Machine
14
The following application services are the architectural
cornerstones of all Android applications, providing the
framework you’ll be using for your own software:
15
Android Libraries
The Android SDK includes all the tools and APIs you
need to write compelling and powerful mobile
applications. The biggest challenge with Android, as
with any new development toolkit, is learning the
features and limitations of its APIs.
16
If you don’t have experience with Java but have used
other object-oriented languages (such as C#), you
should find the transition straightforward. The power of
Android comes from its APIs, not the language being
used, so being unfamiliar with some of the Java -
specific c classes won’t be a big disadvantage.
17
Hardware-Imposed Design Considerations
Be Efficient
Manufacturers of embedded devices, particularly
mobile devices, generally value small size and long
18
battery life over potential improvements in processor
speed. For developers, that means losing the head start
traditionally afforded thanks to Moore’s law (the
doubling of the number of transistors placed on an
integrated circuit every two years). In desktop and
server hardware, this usually results directly in
processor performance improvements; for mobile
devices, it instead means thinner, more power-efficient
mobiles, with brighter, higher resolution screens. By
comparison, improvements in processor power take a
back seat.
19
capacities. (MP3 collections still tend to expand to fill
the available storage.) Although an 8GB fl ash drive or
SD card is no longer uncommon in mobile devices,
optical disks offer more than 32GB, and terabyte drives
are now commonly available for PCs. Given that most
of the available storage on a mobile device is likely to
be used to store music and movies, many devices offer
relatively limited storage space for your applications.
21
Android devices are now available with a variety of
screen sizes, from small-screen QVGA phones to 10.1"
tablets and 46" Google TVs. As display technology
advances and new Android devices are released, screen
sizes and resolutions will be increasingly varied. To
ensure that your application looks good and behaves
well on all the possible host devices, you need to design
and test your application on a variety of screens,
optimizing for small screens and tablets, but also
ensuring that your UIs scale well on any display.
22
mobile devices, it’s likely that your applications
will regularly move into and out of the background.
It’s important that they “come to life” quickly
and seamlessly. Android’s nondeterministic
process management means that if your application
is in the background, there’s every chance it will
get killed to free resources. This should be invisible
to the user. You can ensure seamlessness by saving
the application state and queuing updates so that
your users don’t notice a difference between
restarting and resuming your application. Switching
back to it should be seamless, with users being
shown the UI and application state they last saw.
24
The Android design philosophy demands that
applications be designed for:
• Performance
• Responsiveness
• Freshness
• Security
• Seamlessness
• Accessibility
Being Responsive
25
Android monitors two conditions to determine
responsiveness:
• An application must respond to any user action,
such as a key press or screen touch, within five
seconds.
Providing Accessibility
28
Dalvik Debug Monitoring Service (DDMS) — Use the
DDMS to monitor and control the Emulators on which
you’re debugging your applications.
30
• ProGuard — A tool to shrink and obfuscate your
code by replacing class, variable, and method
names with semantically meaningless alternatives.
32
• Client applications (such as the DDMS) that
communicate with the daemon through the service
33