CS Answer
CS Answer
CS Answer
Android OS
Blackberry OS
Apple iOS
Windows Mobile Operating System
Symbian OS
d) Android uses the action ACTION_SEND to send data from one activity to
another, even across process boundaries. You need to specify the data and its
type. The system automatically identifies the compatible activities that can receive
the data and displays them to the user.
g) It defines the user interface for the main activity of an application. The file is
written in XML and includes elements like buttons, text views, image views, etc.
Each element in the XML is translated into Java classes at runtime.
i) Views represent the UI elements like buttons, text fields, and images, while
ViewGroups act as containers for organizing and arranging these Views.
Section B
c) The DVM is a virtual machine to run Android applications. The DVM executes
Dalvik bytecode, which is compiled from programs written in the Java language.
Note that the DVM is not a JVM. One of the key design principles of the DVM is
that it should run on low memory mobile devices and loads quicker compared to
any JVM.
e) The Android Manifest is an XML file which contains important metadata about
the Android app. This includes the package name, activity names, main activity
(the entry point to the app), Android version support, hardware features support,
permissions, and other configurations.
f) Android software development is the process by which applications are created
for devices running the Android operating system. Google states that "Android
apps can be written using Kotlin, Java, and C++ languages" using the Android
software development kit (SDK)
g) A ViewGroup is a special view that can contain other views. The ViewGroup is
the base class for Layouts in android, like LinearLayout , RelativeLayout ,
FrameLayout etc. In other words, ViewGroup is generally used to define the layout
in which views(widgets) will be set/arranged/listed on the android screen.
h) In Android, whenever we want to bind some data which we get from any data
source (e.g. ArrayList, HashMap, SQLite, etc.) with a UI component(e.g. ListView,
GridView, etc.) then Adapter comes into the picture. Basically Adapter acts as a
bridge between the UI component and data sources.
i) A drawable folder is nothing but a resource directory in Android studio source
code of your project. This folder holds images, png which are referenced in code
via R.drawable.xyz.
Section C
a) Difference between Windows and Android are as follows:
WINDOWS ANDROID
It was developed and is owned by Microsoft It was developed and is owned by Google
Incorporation. LLC.
Current stable version is Windows 11. Current stable version is Android 13.
It is for workstation, personal computers, media center, Its target system type is smartphones and
tablets and embedded systems. tablet computers.
b) The class file i.e the byte code for Android is first optimized even more to make
it mobile friendly, Which usually has a custom format according to specifications of
Dalvik VM, which differs from normal bytecode. Hence direct JAVA bytecode
wont't run in Android.
c) In a single thread or threading, the process contains only one thread. That
thread executes all the tasks related to the process. In a multi-threaded
application, multiple threads are executed concurrently. Each thread handles
different tasks simultaneously by making optimal use of the resources. In Java,
there are two methods to create threads. These are by implementing a Runnable
interface or extending the Thread class.
onResume called when activity will start interacting with the user.
f) An android component is simply a piece of code that has a well defined life
cycle e.g. Activity, Receiver, Service etc. The core building blocks or fundamental
components of android are activities, views, intents, services, content providers,
fragments and AndroidManifest.xml.
g) Steps to be written
h) A layout defines the structure for a user interface in your app, such as in an
activity. All elements in the layout are built using a hierarchy of View and
ViewGroup objects. A View usually draws something the user can see and interact
with.
Android Linear Layout: LinearLayout is a ViewGroup subclass, used to provide child View
elements one by one either in a particular direction either horizontally or vertically based on the
orientation property.
Android Constraint Layout: ConstraintLayout is a ViewGroup subclass, used to specify the
position of layout constraints for every child View relative to other views present. A
ConstraintLayout is similar to a RelativeLayout, but having more power.
Android Grid View: GridView is a ViewGroup that is used to display a scrollable list of items in a
grid view of rows and columns.
i) Intent intent = new Intent(getApplicationContext(), Second_activity.class);
intent.putExtra("message_key", str);
startActivity(intent);
j) The View class is the base class or we can say that it is the superclass for all the GUI
components in android. For example, the EditText class is used to accept the input from
users in android apps, which is a subclass of View. View refer to
the android.view.View class, which is the base class of all UI classes.
The ViewGroup class is a subclass of the View class. And also it will act as a base class
for layouts and layouts parameters. The ViewGroup will provide an invisible container to
hold other Views or ViewGroups and to define the layout properties. For example, Linear
Layout is the ViewGroup that contains UI controls like Button, TextView, etc., and other
layouts also.