Mad 2 Marks Questions
Mad 2 Marks Questions
Bodale
2 MARKS QUESTIONS
1) Explain the android ecosystem.**
Android ecosystem refers to the interdependence between the demand and supply of
users, equipment makers, and software developers.
One cannot exist without the other.
5)drawable: The drawable folder contains graphics that can be drawn to the screen.
6)layout: The layout folder contains XML files used for your layouts.
7)mipmap : The mipmap folder contains the launcher icon files for the app.
8)values: The values folder contains XML files that contain simple values, such as
strings, integers, and colors.
5) List types of permissions in android.
a)Normal permissions are typically granted automatically during installation and
include low-risk items like internet access.
b)Runtime permissions, also known as dangerous permissions, require user consent
at runtime and involve access to sensitive data or actions.
c)Special permissions have stricter requirements and might be granted to specific
apps or system components.
d)Signature Permissions: Apps signed with the same key can share signature-level
permissions.
6) List attributes of radio button. (Any four)
android:id
android:text
android:onClick
android:checked
android:visibility
android:minWidth
android:minHeight
https://console.developers.google.com/project
c)Now click on APIs and Services and open Dashboard from it.
f)Now go to Credentials.
h)Now API key will be generated.Copy it and save it somewhere as we will need
it when implementing Google Map in Android project.
8) List all tools and softwares required for developing an android application.**
Necessary for compiling and running Java code, which is the primary language used
for Android development.
Android Software Development Kit (SDK):
Provides the necessary tools, APIs, and libraries for developing Android applications.
Gradle Build System:
An automated build tool used by Android Studio to manage dependencies and build
the app.
Android Virtual Device (AVD) Manager:
Allows you to create and manage virtual devices (emulators) for testing your app.
Android Debug Bridge (ADB):
A command-line tool for debugging and running applications on connected Android
devices.
Version Control System (VCS):
Git is a common choice for managing code changes, collaborating with others, and
tracking the history of your project.
android:id android:layout_marginLeft
android:layout_width android:layout_marginRight
android:layout_height android:layout_marginTop
android:layout_gravity android:layout_marginBottom
b)Reverse geocoding is the opposite, converting those geographic coordinates back into a
human-readable address or place nameUseful in navigation systems, delivery services, and
other applications where knowing the address of a location is needed based on GPS data.
An Intent is a messaging object you can use to request an action from another app
component.
Intents are used for facilitating communication between components like Activities,
Services and Broadcast Receivers.
b)Explicit Intent
Explicit Intent specifies the component. In such a case, intent provides the external class
to be invoked.
Syntax:
Intent i = new Intent(getApplicationContext(), ActivityTwo.class);
startActivity(i);
a) Radio button allows users to select one option from a group of mutually exclusive
choices
b) Radio buttons are typically used when presenting a list of options where only one can be
selected , like choosing a preference or a setting.
a) Toggle button allows users to toggle between two states (usually "on" and "off")
b) Toggle buttons, on the other hand, are often used for settings that can be enabled or
disabled, like turning Wi-Fi on or off.
Broadcast Receiver is a component that allows an app to listen for and respond to system-
wide or app-specific events, also known as broadcasts. These broadcasts are essentially
"intents" that indicate an event has occurred, such as the device booting, battery level
changes, or a new SMS message.
OR
Components of UI
Mobile Application Development(22617) Prepared by:Prof.F.R.Bodale
a)addMarker()
You can place a maker with some text over it displaying your location on the map. It can be
done by via addMarker() method. Its syntax is given below
b)setMapType
You can also change the type of the MAP. There are four different types of map and each
give a different view of the map. These types are Normal,Hybrid,Satellite and terrain. You
can use them as below
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
"OHA" refers to the Open Handset Alliance, a consortium of technology and mobile
companies that developed Android.
The Open Handset Alliance's goal is to accelerate innovation in mobile and provide
consumers with a better, less expensive, and richer mobile experience. They developed
Android as the first open, free, and complete mobile platform.
Mobile Application Development(22617) Prepared by:Prof.F.R.Bodale
1)The javac compiler compiles the java source file into the class file.
2)The dx tool takes all the class files of your application and generates a single .dex file
which is a platform specific tool.
3)Then Android Assets Packaging Tool (aapt) handles the packaging process and finally
creates an executable file with extension .apk.
4)An APK file contains all of a program's code (such as .dex files), resources, assets,
certificates, and manifest file.
Content Providers are used to share data between two applications. This can be
implemented in two ways:
1. When you want to implement the existing content provider in another application.
2. When you want to create a new content provider that can share its data with other
Applications
a)Linear Layout
b)Absolute Layout
c)Frame Layout
d)Table Layout
e)Relative Layout
Android Fragment is the part of activity, it is also known as sub-activity. There can be
more than one fragment in an activity.
Fragments represent multiple screen inside one activity.
With the help of Fragment’s we can divide the screens in different parts and controls
different parts separately
In Android, you can use SmsManager API or devices Built-in SMS application to send
SMS's
Android SMS is stored in PDU (protocol description unit) format
SmsManager class takes care of sending the SMS message.
We just need to get an instance of it and send the SMS message.
We need to add permission to SEND_SMS in the Android manifest file.
The Dex compiler helps convert the class file into .dex file, the following image shows
how it flows:
First of all the .java file converts into .class file with the help of Java compiler.
Next .class file converts into .dex file using Dec compiler.
Then finally the packaging process is handled by the Android Assets packaging
(aapt) tools.