You are on page 1of 12

2.01.

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:

In Android development, an Intent is a messaging object that facilitates communication


between components of an application or between different applications. It is used for
starting activities, services, and broadcasting messages.

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.

Ans. Android vs. Other Environments:

Android:

Opensource operating system primarily designed for mobile devices.

Based on Linux kernel.

Utilizes Java for app development (Kotlin also supported).

Supports a wide range of devices from various manufacturers.

Emphasizes integration with Google services.

Provides extensive APIs for hardware access, multimedia, and connectivity.

Offers a diverse app ecosystem through Google Play Store.

Other Environments (e.g., iOS, Web):

iOS: Closedsource operating system developed by Apple for its devices.

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.

3. Describe these App components Intent filters, Content Sharing.

Ans. App Components:

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.

4. Develop an App to build a simple calculator.

Ans. Simple Calculator App:

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.

Use EditText or TextView to display the input and result.

Ensure proper error handling for invalid inputs or operations.

Test the app thoroughly to ensure accurate calculations and userfriendly experience.

5. Write a note on performance, security, modifiability of mobile app.

Ans. Performance, Security, and Modifiability of Mobile Apps:

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.

6. Discuss the Activity life cycle in detail.

Ans. Activity Lifecycle:

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:

• onCreate(): Called when the activity is first created.


• onStart(): Called when the activity becomes visible to the user.
• onResume(): Called when the activity is ready for user interaction.
• onPause(): Called when the activity is partially obscured or losing focus.
• onStop(): Called when the activity is no longer visible to the user.
• onDestroy(): Called before the activity is destroyed.

Understanding the activity lifecycle is essential for managing resources, handling


configuration changes, and maintaining app state across different user interactions.

7. Explain the various resources and files used by android.

Ans. Android Resources and Files:

Android apps use various types of resources and files, including:

• 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

a) Four basic controls used in Android GUI applications are:

TextView: Used for displaying text on the screen.

EditText: Allows users to input text.

Button: Triggers actions or events when clicked.

ImageView: Displays images or icons.

b) Different states in Android application development life cycle include:

onCreate(): Initial state when an activity is created.

onStart(): Activity becomes visible but not yet interactive.

onResume(): Activity is in the foreground and ready for user interaction.

onPause(): Activity partially visible, can be paused or resumed.

onStop(): Activity is no longer visible but still in memory.

onDestroy(): Activity is being destroyed.

c) Main components of Android SDK (Software Development Kit) include:

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.

d) Difference between 'JAVAC' and 'JVM':

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.

f) Device Streaming in Android Application Development:

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:

A navigation drawer is a UI component used in Android apps to provide navigation options


in a hidden or collapsible panel. Users can swipe from the edge of the screen or tap on a
menu icon to reveal the navigation drawer, which typically contains links to different
sections or features of the app. For example, in a news app, the navigation drawer may
include options like Home, Categories, Settings, etc.

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).

i) 'Encapsulation' and 'Data Abstraction' in Java:

Encapsulation: Encapsulation is the concept of bundling data (attributes) and methods


(functions) that operate on the data into a single unit, called a class. It helps in data hiding
and maintaining code modularity and security.

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.

j) Advantages of an Intelligent Code Editor:

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.

2. Discuss android development system architecture. How java AP interacts with


Android Runtime(ART).

Ans. Android Development System Architecture and Interaction with Java:


The Android development system architecture comprises several layers that work together
to create and run Android applications. The key components include:

• Linux Kernel: Provides core system functionalities such as memory management,


process management, and device drivers.
• Hardware Abstraction Layer (HAL): Bridges the gap between the kernel and upper
layers, allowing Android to work with different hardware components.
• Android Runtime (ART/Dalvik): Executes application code written in Java or Kotlin.
Java APIs interact with Android APIs through this layer.
• Application Framework: Provides highlevel services and APIs for building Android
apps, including activities, services, content providers, and broadcast receivers.
• System Apps: Preinstalled apps that come with the Android system, such as the
dialer, contacts, settings, etc.
• User Apps: Apps developed by thirdparty developers and installed by users from
the Google Play Store or other sources.

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.

Ans. Difference between 'System Prototype' and 'System Model':

System Prototype: A system prototype is a working model or demonstration of a software


system that showcases its basic functionalities and user interface. It provides a tangible
representation of how the final system will look and behave, allowing stakeholders to
visualize and test its features. For example, a prototype of a mobile banking app may
include basic account management functionalities like viewing balances and transferring
funds, showcasing the app's user interface and interaction flow.

System Model: A system model is a conceptual representation of a software system that


defines its structure, behavior, and relationships among components. It includes various
diagrams, such as class diagrams, sequence diagrams, and use case diagrams, to
illustrate the system's architecture, data flow, and functionality. For instance, a system
model of an ecommerce platform would depict the relationships between users, products,
orders, payments, and other system components, helping developers and designers
understand the system's design and functionality.

4. Explain directory structure of android based application software development.


Give usage of resources folder with its sub folder in your mobile application.

Ans. Directory Structure of AndroidBased Application Software Development:

The directory structure of an Android application typically includes the following main
directories:

• app/src/main/java: Contains Java/Kotlin source code files for the application.


• app/src/main/res: Contains resources such as layouts, drawables, strings, and
other assets used by the application.
• app/src/main/AndroidManifest.xml: Defines the app's configuration,
permissions, activities, services, and other components.
• app/build.gradle: Configuration file for build settings, dependencies, and other
projectspecific configurations.

The `res` directory further contains subfolders like:

• drawable: Stores drawable resources such as images, icons, and graphics.


• layout: Contains XML layout files defining the UI structure of activities and
fragments.
• values: Stores XML files for defining values like strings, dimensions, colors, styles,
and themes used in the app.
• mipmap: Stores launcher icons in different densities for various screen
resolutions.

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.

Ans. Software Testing, Validation, and Verification in Android Development:

• Software Testing: Software testing is the process of evaluating a software system


or application to ensure that it meets specified requirements and functions
correctly. It involves various techniques such as unit testing, integration testing,
system testing, and acceptance testing to identify bugs, errors, and defects in the
software.
• Validation: Validation checks if the software meets the user's needs and
requirements. It ensures that the software performs its intended functions
accurately and effectively. Validation is essential to verify that the software meets
user expectations and delivers value.
• Verification: Verification confirms whether the software adheres to its
specifications and standards. It involves checking if the software is built correctly
according to the design and requirements. Verification ensures that the software
works as intended and complies with quality standards.

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.

6. Discuss with exmaples various GUI elements in any mobile application.

Ans. Various GUI Elements in Mobile Applications:

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:

• Buttons: Used for triggering actions or navigating within the app.


• Text Fields: Allow users to input text or numeric data.
• Lists and Grids: Display information in a scrollable list or grid format.
• Images and Icons: Enhance visual appeal and convey information.
• Navigation Bars: Provide navigation options and menus for app navigation.
• Tabs: Organize content into separate tabs for easy access.
• Dialog Boxes: Display messages, alerts, or prompts to the user.
• Spinners and Pickers: Allow users to select options from a dropdown or pick
values from a list.
• Progress Bars: Show progress or loading status for tasks.

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.

Ans. Control of Display Orientation Changes and Layout Customization in Android


Development:

Display orientation changes in Android apps can be controlled using different layout
customization techniques, including 'absolute' and 'relative' layouts:

• Absolute Layout: In an absolute layout, UI components are positioned using


specific coordinates (x, y) relative to the screen's topleft corner. This approach
offers precise control over element placement but may lead to issues with screen
sizes and orientations on different devices. Example code snippet for absolute
layout in XML:

```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"

android:text="Click Me" />

</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"

android:text="Click Me" />

</RelativeLayout>

```

By using appropriate layout types and attributes like `android:layout_centerInParent`,


developers can control how GUI elements are positioned and displayed when the device's
display orientation changes, ensuring a consistent and userfriendly experience across
different devices and screen sizes.

You might also like