Professional Documents
Culture Documents
23
a) Android Stack:
The Android stack refers to the software architecture of an Android device, including the
Linux kernel, native libraries, the Android Runtime (ART or Dalvik), application framework,
and user interface components.
b) Intent:
c) Menus:
In Android, menus are user interface components that provide options for users to interact
with an app. There are three types of menus: options menu, context menu, and popup
menu, each serving different purposes based on the app's design and functionality.
d) JVM:
JVM stands for Java Virtual Machine. In Android development, the Android Runtime (ART) or
Dalvik Virtual Machine (DVM) serves as the JVM for executing Android applications,
converting bytecode into machine code that can run on the device.
e) XML:
XML (Extensible Markup Language) is widely used in Android development for defining
layouts, views, and resources. It provides a structured way to represent data and UI
elements in Android apps.
f) Toast:
Toast is a small popup message that appears briefly at the bottom of the screen in an
Android app. It is commonly used to display notifications or short messages to the user.
g) File Access:
Android provides various APIs for file access, allowing apps to read, write, and manage
files on the device's internal storage, external storage, or other accessible locations.
h) Scalability:
Scalability in the context of Android development refers to the ability of an app to handle
increasing loads and user interactions without sacrificing performance or user experience.
It involves designing apps that can adapt to different screen sizes, device capabilities, and
user scenarios.
i) DVM:
DVM stands for Dalvik Virtual Machine, which was the predecessor to ART (Android
Runtime). DVM was used in earlier versions of Android for running apps and handling
bytecode execution.
j) Query providers:
Content providers in Android allow apps to share data between themselves. Query
providers specifically refer to the ability to query data from a content provider, typically
using a ContentResolver to retrieve and manipulate data stored by other apps.
2. Differentiate between Android and other Environments? Also write note on smart
phones.
Android:
Web: Platformindependent environment using web technologies like HTML, CSS, and
JavaScript.
Note on Smartphones:
Smartphones are mobile devices that combine the functionalities of a phone, computer,
and multimedia device. They typically include features like touchscreens, internet
connectivity, cameras, sensors, and app ecosystems. Smartphones have become
essential tools for communication, productivity, entertainment, and accessing digital
services on the go.
a) Intent Filters: Intent filters are declarations in an Android app's manifest file that specify
the types of intents an app can respond to. They define the actions, categories, and data
types that the app can handle, allowing other apps or system components to interact with
it based on specified criteria.
b) Content Sharing: Content sharing in Android involves sharing data (such as text,
images, files) between apps or with external sources. It can be achieved through
mechanisms like content providers, intents (with appropriate data types and actions),
sharing dialogs, or direct communication between apps using APIs like ShareCompat.
Here's a basic outline of how you could create a simple calculator app in Android:
Design the UI layout with buttons for numbers, arithmetic operations, and result display.
Implement logic to handle button clicks and perform calculations based on user input.
Test the app thoroughly to ensure accurate calculations and userfriendly experience.
Performance: Mobile app performance is crucial for providing a smooth user experience.
Factors affecting performance include app responsiveness, loading times, battery
efficiency, and optimization for different devices and network conditions.
Security: Mobile app security involves protecting user data, preventing unauthorized
access, securing communication channels, and implementing secure coding practices. It
includes measures like data encryption, authentication, permissions management, and
regular security updates.
Modifiability: Modifiability refers to the ease with which an app can be modified, updated,
or extended. It depends on factors like code maintainability, modular design, version
control, and adherence to coding standards. Wellstructured apps with clear separation of
concerns are more modifiable and easier to maintain over time.
The Activity lifecycle in Android refers to the series of states an activity goes through during
its lifetime, from creation to destruction. The key lifecycle methods include:
• XML Resources: Used for defining layouts, drawables, strings, dimensions, colors,
styles, and other UI elements.
• Bitmap and Vector Drawables: Images and icons used in the app's UI.
• Strings.xml: Contains localized strings for different languages, improving app
localization.
• Layout Files: Define the arrangement of UI elements in activities and fragments.
• Raw and Asset Files: Store raw data or assets like fonts, audio, video, or
configuration files.
• SQLite Databases: Used for storing structured data locally within the app.
• SharedPreferences: Store keyvalue pairs for lightweight data storage.
• External Storage: Accessible for storing larger files like media, downloads, or
usergenerated content.
20.11.23
Android Studio: Integrated development environment (IDE) for Android app development.
Android SDK Tools: Provides tools and libraries for developing, testing, and debugging
Android apps.
Android Platform Tools: Includes tools like ADB (Android Debug Bridge) for managing
connected devices.
Android Support Libraries: Offers backward compatibility and additional features for older
Android versions.
Emulator: Virtual device for testing apps on different Android versions and screen sizes.
JAVAC: JAVAC is the Java Compiler, responsible for compiling Java source code (.java files)
into bytecode (.class files) that can be executed by the Java Virtual Machine (JVM).
JVM: JVM (Java Virtual Machine) is an abstract machine that executes Java bytecode. It
provides a runtime environment for Java programs, handling tasks like memory
management, garbage collection, and bytecode interpretation.
e) MapKit:
MapKit is a framework provided by Apple for iOS app development. It allows developers to
integrate maps and locationbased services into their apps, such as displaying maps,
adding annotations, and accessing location data.
Device streaming refers to the process of streaming audio, video, or screen content from
an Android device to another device or platform. It can be used for purposes like remote
control, screen sharing, or media playback on external devices.
g) Navigation Drawer:
h) Basic dependencies:
Dependencies in software development refer to external libraries or modules that an
application relies on to function. Basic dependencies in Android development often
include libraries for UI components (like RecyclerView, ViewPager), networking (like
Retrofit, OkHttp), database management (like Room), and testing (like JUnit, Espresso).
Data Abstraction: Data abstraction refers to the process of hiding implementation details
and exposing only essential features or functionalities to the outside world. It allows
developers to focus on what an object does rather than how it does it, promoting code
reusability and simplifying complex systems.
Autocompletion: Helps in typing code faster and reduces errors by suggesting code
snippets, variable names, and method signatures.
Syntax highlighting: Highlights syntax elements in different colors, making code more
readable and identifying errors or inconsistencies.
Code navigation: Allows easy navigation between different parts of the codebase, such as
classes, methods, and declarations.
Code analysis: Provides suggestions and warnings for potential issues, improving code
quality and adherence to best practices.
Refactoring tools: Offers tools for refactoring code, such as renaming variables, extracting
methods, and organizing imports, enhancing code maintainability and scalability.
Java APIs interact with the Android Runtime (ART) through the Java Native Interface (JNI).
When an Android app written in Java or Kotlin is compiled, it generates bytecode that runs
on the Android Runtime. The Android SDK provides libraries and APIs that bridge the gap
between Java code and Android's lowerlevel functionalities, allowing developers to access
device features, UI components, and system services.
3. Explain difference between 'system prototype' and 'system model' with suitable
examples.
The directory structure of an Android application typically includes the following main
directories:
These folders organize the project's resources, making it easier to manage and access
different types of files required for Android app development.
5. What is software testing, validation and verification? How and why, these are used
in android development environment.
In Android development, software testing, validation, and verification are crucial to ensure
the reliability, functionality, and quality of Android apps. Testing frameworks like JUnit,
Espresso, and UI Automator are commonly used for testing Android applications, covering
different aspects such as unit testing, UI testing, and integration testing.
Mobile applications typically include various GUI (Graphical User Interface) elements to
provide a rich and interactive user experience. Some common GUI elements in mobile
apps include:
Each GUI element serves a specific purpose in the app's interface, contributing to a
seamless and intuitive user experience.
7. How display orientation changes are controlled? Explain 'absolute' and 'relative'
layout customization of screen orientation in an android application development.
Display orientation changes in Android apps can be controlled using different layout
customization techniques, including 'absolute' and 'relative' layouts:
```xml
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/myButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="100dp"
android:layout_y="100dp"
</AbsoluteLayout>
```
• Relative Layout: In a relative layout, UI components are positioned relative to each
other or to the parent container. This layout type offers more flexibility in adapting to
different screen sizes and orientations. Example code snippet for relative layout in
XML:
```xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/myButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
</RelativeLayout>
```