Part A: 2020 March
Part A: 2020 March
Module 1 : Android
2020 March
Both OpenGL ES and SQLite are fundamental technologies used in Android app
development to provide a rich and engaging user experience and to manage data effectively.
3. What is DVM?
DVM (Dalvik Virtual Machine) is a virtual machine used in Android to run Java-based
applications. It is designed to optimize memory usage and run multiple instances efficiently.
DVM has been replaced by ART (Android Runtime) since Android 5.0, which offers improved
performance and features.
2021 April
2022 April
2020 March
● Provide a powerful IDE for developing Android apps. ADT includes a number of
features that make it easy to develop Android apps, such as a graphical layout editor,
a debugger, and a code editor.
● Make it easy to create new Android projects. ADT can create new Android
projects with a few clicks, and it can also import existing Android projects.
● Provide access to the Android SDK tools. ADT includes a number of tools that
can be used to develop Android apps, such as the Android SDK Manager, the
Android SDK Tools, and the Android SDK Emulator.
● Help you debug your Android apps. ADT includes a debugger that can help you
find and fix bugs in your Android apps.
● Make it easy to generate signed APK files. ADT can generate signed APK files
that can be distributed to users.
To use Relative Layout, you first need to create a RelativeLayout object in your layout file.
Then, you can add child views to the RelativeLayout by specifying their ID and their position
relative to the parent or other child views. For example, you could add a button to the top left
of the parent view by using the following code:
<RelativeLayout
android:id="@+id/my_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/my_button"
android:layout_x="0dp"
android:layout_y="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Button"
/>
</RelativeLayout>
In this example, the button will be positioned at the top left of the parent view, because it has
an x and y position of 0dp. Relative Layout is a powerful tool that allows you to create
complex layouts in Android. It is a good choice for layouts that need to be flexible and
adaptable.
2021 April
● App developers: App developers are a critical stakeholder group for Android, as
they create the apps that run on the platform. Developers use Android tools and APIs
to build and distribute their apps on the Google Play Store and other app stores.
● Users: Android users are the ultimate stakeholders, as they are the ones who use
the platform to access apps and services on their mobile devices. User feedback and
usage patterns help shape the direction of the Android platform over time.
Overall, the success of Android depends on the collaboration and cooperation of all these
stakeholders, as they work together to create a platform that is useful, innovative, and user-
friendly.
14. Explain Table Layout with an example.
TableLayout is a ViewGroup in Android that arranges its child views in rows and columns.
Each row in a TableLayout is defined using a TableRow, and each cell or column is defined
using a child view of the TableRow.
<TableRow>
<TextView
android:text="Name" />
<EditText />
</TableRow>
<TableRow>
<TextView
android:text="Age" />
<EditText />
</TableRow>
</TableLayout>
This creates a simple table with two rows and two columns. The first column in each row
contains a TextView with the label, and the second column contains an EditText where the
user can enter data. TableLayout is a useful tool for creating forms and other types of data
entry screens in Android. It allows you to organize your views in a clear and easy-to-read
way, making it easier for users to understand and interact with your app.
2022 April
Moreover, Android supports a variety of programming languages like Java, Kotlin, and C++,
making it easier for developers to write code. It also supports various hardware features like
touchscreens, accelerometers, and cameras, providing ample opportunities to develop
innovative mobile applications. Furthermore, Android provides seamless integration with
Google services such as Google Maps, Google Drive, and Google Play, making it easier for
developers to create and distribute their apps.
Activities represent screens in the application, and each screen is defined as an Activity in
the application manifest file. Services are used for background processing and can run even
if the application is not in the foreground. Broadcast Receivers listen for system events and
respond accordingly. Content Providers allow applications to share data and interact with
each other.
2020 March
● Large user base: Android has a large user base, with over 2.5 billion active devices
worldwide. This means that there is a huge market for Android apps, making it an
attractive platform for developers.
● Easy to develop: Android provides a range of tools and resources that make it easy
for developers to create mobile applications. The Android SDK includes a range of
libraries, APIs, and development tools that simplify the process of app development.
● Integration with other Google services: Android integrates seamlessly with other
Google services, such as Google Maps, Google Drive, and Google Analytics, which
can be useful for developers who want to create mobile applications that rely on
these services.
Overall, Android is a popular choice for mobile application development because of its
flexibility, ease of use, and large user base.
2021 April
On the other hand, a .jar file contains compiled Java classes, resources, and metadata. It is
used as a library or a component that can be used by other Java applications or libraries.
In summary, while both .apk and .jar contain compiled code, .apk is specific to Android
applications while .jar is a more general file format for Java libraries and applications.
b) JVM (Java Virtual Machine) and DVM (Dalvik Virtual Machine) are both virtual machines
used to run code in different environments. However, there are some significant differences
between the two:
● Language: JVM is designed to run Java bytecode, while DVM is designed to run
bytecode that is generated by the Android SDK, which includes Java as well as other
languages such as Kotlin.
● Architecture: JVM is stack-based, while DVM is register-based. This means that DVM
uses a smaller instruction set and can execute code more efficiently.
● Memory management: JVM uses a garbage collector to manage memory, while DVM
uses a combination of garbage collection and manual memory management.
● Performance: DVM is optimized for mobile devices with limited resources, while JVM
is designed for desktop and server environments. This makes DVM more efficient
and faster in terms of performance in the context of Android.
Overall, while JVM and DVM have some similarities, they are designed for different
purposes and have different architectures and features.
2022 April
Android Virtual Device (AVD) is an emulator configuration that allows Android application
developers to test their application on different virtual devices. It provides a virtual
environment to run the application, simulating different configurations of devices, screen
sizes, and hardware specifications. The emulator runs the Android operating system in a
virtual environment, allowing the developers to test their apps on different versions of
Android.
To create an AVD, the developer needs to use the Android Virtual Device Manager (AVD
Manager) in Android Studio. The AVD Manager provides various configuration options to
create an emulator, including the device type, screen size, resolution, and Android version.
Developers can create multiple AVDs with different configurations to test their applications
on various devices.
b) Android Emulators:
Android Emulator is a software program that allows developers to test their Android
applications without a physical device. It is a virtual mobile device that mimics the hardware
and software features of a real mobile device. Emulators provide a way for developers to test
and debug their applications on different virtual devices without requiring a physical device.
Android Studio provides an emulator that simulates different configurations of virtual devices,
including different screen sizes, resolutions, hardware specifications, and Android versions.
Developers can use the emulator to test their applications on different virtual devices,
enabling them to optimize their apps for a wide range of devices.
Emulators can also be used to run Android applications on desktop computers, allowing
users to experience the app on a larger screen. This is useful for testing and debugging the
application, as well as for demonstrating the app to clients or users.