0% found this document useful (0 votes)
9 views26 pages

Mad Imp

All the imp question for msbte 6th sem i scheme mad exam

Uploaded by

mejac29486
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views26 pages

Mad Imp

All the imp question for msbte 6th sem i scheme mad exam

Uploaded by

mejac29486
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

MAD IMP

Chapter 1
Q.1. Features of Android Operating System [2M]
Features of Android Operating System:
1)Storage
2)Multitasking
3)Web Browser
4)Open Source
5)Accessibility
6)Media Support
7)Streaming Media Support
8)Voice Based Features
9)Multitouch
10)External Storage
11)Video Calling
12)Handset Layout
13)Google cloud Messaging
14)WiFi Direct

Q.2. Define OHA and state goal of OHA. [2M]

The OHA is the group that is in charge of the Android smartphones operating system.
It was created by Google. The Open Handset Alliance (OHA) is consortium of
multiple companies like Samsung, Sony, Intel and many more to provide services and
deploy handsets using android platform. The Open Handset Alliance (OHA) is an
association whose goal is to develop open standards for mobile devices, promote
innovation in mobile phones and provide a better experience for consumers at a lower
cost.

Q.3. State Android ECO System. [2 M]


• an ecosystem in markets means how different parts depend on each other, like
demand and supply.
• In android ecosystem, Users, developers, and device makers all rely on each other.
• Google makes Android software.
• Users buy devices and apps.
• Device makers sell devices, often with apps included.
• Developers buy devices to create and sell apps.
• Freelance Android developers create their own apps and publish them on the
Google Play Store.

Q.4. List various tools for android application development [2M]


• Android Studio
• ADB (Android Debug Bridge)
• AVD Manager
• Eclipse
• Fabric
• FlowUp
• GameMaker: Studio
• Genymotion
• Gradle IntelliJ IDEA

Q.5. Describe the different features of Android. [4M]


• User Interface: The Android operating system has a user-friendly interface that is
easy to use.
• Multiple Language Support: Android works in many languages. You can easily
change the language to suit your needs. It supports international languages like
English, German, Chinese, Dutch, French, Japanese, Korean, Russian, and more.
It also supports several Indian languages like Hindi, Marathi, Gujarati, and
Punjabi.
• Multi-tasking: Android allows you to run multiple apps at the same time. You
can use several apps and services in the background without any hassle.
• Connectivity: Android supports many types of connections, such as WiFi,
Bluetooth, mobile hotspots, CDMA, GSM, NFC, VoLTE, USB, VPN, 3G, and 4G
networks.
• Application Support: The Google Play Store is the main place to download and
update apps on Android. You can also download apps manually using files called
APKs, but this is not recommended because these third-party apps might be less
secure.

Q.6. Describe android and importance of OHA


Android is an open-source operating system based on Linux. It is mainly designed for
touch screen devices like smartphones and tablets. Android allows developers to
create apps that can work on different devices using the Android platform, which
makes app development easier. Android was created by the Open Handset Alliance
(OHA), which is led by Google along with other companies.
Open Handset Alliance (OHA)
• The Open Handset Alliance is a group of companies that work together to
develop standards for mobile devices.
• It has about 80 member companies, including HTC, Dell, Intel, Motorola,
Qualcomm, and Google.
Importance of OHA
• Lower Costs: OHA helps reduce the overall cost of mobile devices by sharing
resources, allowing companies to focus on creating innovative apps and services.
• Support for Developers: In the open-source community, developers share
knowledge and tools, which speeds up the process of creating apps.
• Marketing and Distribution: OHA provides great ways for developers to market
and distribute their applications after they have been created.

Q.7. Explain the need of Android Operating System. Also describe any four features
of android.

Need for Android Operating System

1. Low Development Cost: Developers can access tools like the Android SDK
and Eclipse IDE for free, making it affordable to create Android apps.
2. Open Source: Android is based on the open-source Linux kernel, allowing
developers to modify and improve the platform to build apps that work on
Android devices.
3. Supports Many Devices: Android works on a wide range of devices,
including various smartphones and tablets. Developers can create apps on
different operating systems like Windows, Mac, or Linux.
4. Wide Carrier Support: Many telecom companies around the world support
Android-powered phones, including Airtel, Vodafone, and AT&T.
5. Open Distribution: The Google Play Store has few restrictions on apps,
allowing developers to distribute their apps easily through it and other
platforms like Amazon’s app store.

Four Features of Android

1. Near Field Communication (NFC): Most Android devices support NFC,


which lets them easily communicate with other devices over short distances,
like tapping to pay.
2. Alternate Keyboards: Android allows users to install different keyboard
styles easily, like SwiftKey or Skype, offering flexible typing options.
3. Infrared Transmission: Android devices can have built-in infrared
transmitters, allowing users to control electronic devices, like TVs, using their
phone or tablet as a remote.
4. Customizable Home Screens: Android lets users customize their home
screens, including adding widgets for quick access to information without
needing to open apps.
Q.8. Describe Android architecture with diagram.[4 M]

1) Applications
• Applications is the top layer of android architecture.
• The pre-installed applications like home, contacts, camera, gallery etc. and
third party applications downloaded from the play store like chat
applications, games etc. will be installed on this layer only.
• It runs within the Android run time with the help of the classes and
services provided by the application framework.

2) Application Framework
• Application Framework provides several important classes which are used
to create an Android application.
• It provides a generic abstraction for hardware access and also helps in
managing the user interface with application resources.
• Generally, it provides the services with the help of which we can create a
particular class and make that class helpful for the Applications creation.
• It includes different types of services activity manager, notification
manager, view system, package manager etc. which are helpful for the
development of our application according to the prerequisite.

3) Application Runtime
• Android Runtime environment is one of the most important part of
Android. It contains components like core libraries and the Dalvik virtual
machine (DVM).
• Mainly, it provides the base for the application framework and powers our
application with the help of the core libraries. Like Java Virtual Machine
(JVM)
• Dalvik virtual machine (DVM) it is a register based machine that converts
byte code into dex code and ensures that app can run multiple instances
efficiently.
• It depends on the layer Linux kernel for threading and low-level memory
management. The core libraries enable us to implement android
applications using the standard JAVA or Kotlin programming languages.

4) Libraries
• The Platform Libraries includes various C/C++ core libraries and Java
based libraries such as Media, Graphics, Surface Manager, OpenGL etc. to
provide a support for android development.
o Media library provides support to play and record an audio and video
formats.
o Surface manager responsible for managing access to the display
subsystem.
o SGL and OpenGL both cross-language, cross-platform application
program interface (API) are used for 2D and 3D computer graphics.
o SQLite provides database support and FreeType provides font
support.
o Web-Kit This open source web browser engine provides all the
functionality to display web content and to simplify page loading.
o SSL (Secure Sockets Layer) is security technology to establish an
encrypted link between a web server and a web browser.

5) Linux Kernel
• Linux Kernel is heart of the android architecture. It manages all the
available drivers such as display drivers, camera drivers, Bluetooth drivers,
audio drivers, memory drivers, etc. which are required during the runtime.
• It is responsible for management of memory, power, devices etc. The
features of Linux kernel are:
o Security: The Linux kernel handles the security between the
application and the system.
o Memory Management: It efficiently handles the memory
management thereby providing the freedom to develop our apps.
o Process Management: It manages the process well, allocates
resources to processes whenever they need them.
o Network Stack: It effectively handles the network communication.
o Driver Model: It ensures that the application works properly on the
device and hardware manufacturers responsible for building their
drivers into the Linux build.
Chapter 2

Q.9. Define Dalvik Virtual Machine (DVM). [2M]


Dalvik Virtual Machine is a register-based machine that compiles byte code to get dex
code and that ensures that a device can run multiple instances efficiently.

Q.10. List any four folders from directory structure of Android project and elaborate
in one line. [2M]

1) App: The App folder contains three subfolders (manifests, java and res) that make
up our application.
2) Manifest: This is where we would put our manifest files. Most Android apps have
single manifest file
3) Java: This is the folder in our project where we will be storing all of the source
code files written in Java programming language.
4) Drawable: The drawable folder contains graphics that can be drawn to the screen.
5) Res: This folder helps to separate and sort the resources of our applications.

Q.11. Define Android Virtual Devices (AVD). [2M]


An Android Virtual Device (AVD) is a configuration that defines the characteristics of
an Android phone, tablet, Wear OS, Android TV, or Automotive OS device that you
want to simulate in the Android Emulator

Q.12. State how the APK files are built? [2M]


APK files are built through several steps:

1. The javac compiler turns the Java source files into class files.
2. The dx tool combines all the class files into one .dex file, which is used by
Android.
3. The Android Assets Packaging Tool (aapt) packages everything together
and creates a file with the .apk extension.
4. An APK file includes all the app's code, resources, assets, certificates, and a
manifest file, which tells Android how to run the app.

Q.13. Define emulator. [2M]


An Android emulator is a tool that creates virtual Android devices on your computer.
The emulator lets you prototype, develop and test Android applications without using
a physical device.

Q.14. Differentiate between DVM and JVM. [4 M]


DVM JVM
It is register based It is stack based
It runs “.dex” file It runs “.class” files
DVM supports android operating system It supports multiple operating systems
only
Here the executable is APK Here the executable is JAR
There is constant pool for every There is constant pool for every class
application

Q.15. Write down the steps to install and configure Android studio. [4 M]
Steps to Install and Configure Android Studio

Step 1:
Go to Android Studio Download Page (https://developer.android.com/android-
studio/download ) to get the installer.
Step 2:

• Click on the "Download Android Studio" button.


• Check the box that says, “I have read and agree to the above terms and
conditions.”
• Click the download button and then select "Save file" in the prompt that
appears.

Step 3:
Once the download is finished:

• Open the downloaded file from your downloads folder.


• Click "Next" in the dialog box that appears.
• Choose an installation path and click "Next."

Step 4:
The installation will begin. Wait for it to complete.
Step 5:
When the installation is finished, click "Finish."

• If you had a previous version of Android Studio, it will ask if you want to
import settings. Choose "Don't import settings" and click "OK."

Step 6:
Android Studio will start and find the required SDK components.
Step 7:
After finding the SDK components, you'll see the Welcome dialog box.

• Choose "Standard" and click "Next."


• Select a theme: “IntelliJ” for light or “Darcula” for dark. Click "Next."

Step 8:
Now, download the SDK components by clicking "Finish." Let it complete the
download. Your Android Studio is now configured!
Step 9:
To start building a new app, click on "Start a new Android Studio project."
Q.16. Explain features of Android SDK. [4 M W-22]

Features of Android SDK

The Android SDK is a set of libraries and tools needed to create Android apps.
When Google updates Android, they also release a new SDK with new features.
The SDK makes it easier to develop and test apps. It works on Windows, Linux,
and macOS.

Important features:

1. Android Tool:
o Manages Android Virtual Devices (AVDs) and SDK components.
2. Emulator Tool:
o Let’s you test apps without using a real phone.
3. Dalvik Debug Monitor Server (DDMS):
o Helps in finding and fixing problems (debugging) in Android apps.
4. Android Debug Bridge (ADB):
o A command-line tool that helps connect and control real devices or
emulators from your computer.

Q.17. Explain Dalvik Virtual Machine and state its importance. [4 M]

The Dalvik Virtual Machine (DVM) is a special virtual machine made for Android
phones. It is designed to use less memory, work fast, and save battery — which
are very important for mobile devices.

The Java source code is first changed into class files using the javac tool. Then, a
tool called dx combines all these class files into one .dex file (Dalvik Executable
file) that can run on the Dalvik VM. Another tool called aapt helps in packing the
app for installation.
[instead of the above 2 para write the answers of Q.9 & 11]
Importance of Dalvik VM
• Efficient Resource Use: By being lightweight and optimized, Dalvik allows
Android apps to use system resources efficiently.
• Compatibility: It maintains compatibility across different Android devices,
enabling a wide range of applications to run.
• Foundation for Android: DVM was the original virtual machine for Android
(before ART was introduced), and it played a crucial role in the early success
of Android apps.
Chapter 3
Q.18. Explain with example, code to create GUI using absolute layout (Assume
suitable data). [4 M S-22]
• Absolute layout means components are positioned in the fixed coordinates
• You use null layout and setBounds() to define location and size.
• This gives complete control over layout, but doesn’t adapt to different screen
sizes or resolutions.
• Example Code:

<AbsoluteLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

<TextView
android:layout_x="110px"
android:layout_y="110px"
android:text="User Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<EditText
android:layout_x="250px"
android:layout_y="80px"
android:layout_width="200dp"
android:layout_height="wrap_content" />

<TextView
android:layout_x="110px"
android:layout_y="200px"
android:text="Password"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<EditText
android:layout_x="250px"
android:layout_y="150px"
android:layout_width="200dp"
android:layout_height="wrap_content" />

<Button
android:layout_x="300px"
android:layout_y="300px"
android:text="Log In"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</AbsoluteLayout>

Q.19. Explain the fundamentals of Ul design in detail. [4 M W-22]

1. Views:
• The basic building block in Android UI is a View. It is a rectangular area
on the screen responsible for drawing and handling user interactions.
• Examples include buttons, text boxes, labels. All UI controls are derived
from the View class.
2. View Groups:
• A View Group is a container that holds multiple Views or other View
Groups, helping organize the layout.
• Examples are LinearLayout, FrameLayout. They define how child Views
are arranged on the screen.
3. Fragments:
• Fragments are reusable parts of a user interface within an Activity.
• They help in designing flexible UI, especially for different screen sizes,
and contain their own layout and input handling.
4. Activities:
• An Activity represents a single screen or page in an app.
• It controls what the user sees and interacts with, similar to a window or
form in desktop applications.

Q.20. List various layouts used in android UI design. [2M]

• Linear Layout
• Absolute Layout
• Frame Layout
• Table Layout
• Relative Layout

Q.21. List any four attributes of layout. [4 M]


android:id
android:layout_width
android:layout_height
android:layout_margin
android:layout_marginTop
android:layout_marginBottom
android:layout_marginLeft
android:layout_marginRight
android:background

Q.22. Explain relative layout with all its attributes.


In Relative Layout we need to specify the position of child views relative to each
other or relative to the parent. In case if we didn’t specify the position of child
views, by default all child views are positioned to top-left of the layout.
Attributes of Relative Layout:

1. android:layout_centerHorizontal="true" – Puts the view in the center of the


parent, horizontally.
2. android:layout_centerVertical="true" – Puts the view in the center of the
parent, vertically.
3. android:layout_centerInParent="true" – Puts the view in the exact center of the
parent (both horizontally and vertically).
4. android:layout_alignParentTop="true" – Sticks the view to the top edge of the
parent.
5. android:layout_alignParentBottom="true" – Sticks the view to the bottom
edge of the parent.
6. android:layout_alignParentLeft="true" – Sticks the view to the left side of the
parent.
7. android:layout_alignParentRight="true" – Sticks the view to the right side of
the parent.

Q.23. Describe directory structure and its components. [4 M]


Directory structure:

App/
│── Manifest/
│ ├── AndroidManifest.xml
│── Java/
│ ├── Java files(MainActivity.java)
│── res/
│ ├── drawable folder
│ ├── layout folder
│ ├── mipmap folder
│ ├── values folder
│── Gradle Scripts folder/

An Android project has different folders that organize the app's files:

1. Manifests Folder
- Contains AndroidManifest.xml.
- It tells Android about your app, like its name, version, and components such as
activities and services.
- Acts as a bridge between Android OS and your app.

2. Java Folder
- Contains Java (or Kotlin) code files like MainActivity.java.
- These are the instructions for your app, such as what happens when a button is
clicked.

3. res (Resources) Folder


- Stores all non-code files needed for your app:

- drawable: Images and icons used in your app.


- layout: XML files that define how the app’s screens look.
- mipmap: Icons shown on the device's home screen, suited for different screen
sizes.
- values: Contains XML files like strings.xml for text, colors, sizes, and styles
used in your app.

4. Gradle Scripts
- Files that help build and organize your app automatically, setting rules for
compiling and packaging your app.
Chapter 4
Q.24. State syntax to create Text View and Image button with any two attributes
of each. [4 M]

TextView
Syntax:
xml
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World"
android:textColor="#FF0000" />
Two attributes:

• id: Assigns a unique name to find the TextView later.


• text: Sets the text displayed on the screen.

ImageButton
Syntax:
xml
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/my_image" />
Two attributes:

• id: Unique identifier for the button.


• srcCompat: Sets an image from the drawable resources to display on the
button.

Q.25. Enlist the elements of UI. [2M]


Elements of UI:
• Menu Bar
• Toolbar
• Navigation Bar
• Editor Tabs
• Editor
• Project Explorer
• Status Bar
• Tool Buttons
Q.26. Name any four attributes of Edit Text control.[ 2 M]
android:id
android: gravity
android: text
android: hint
android: textColor
android: textSize
android: textStyle
android: background

Q.27. Write difference between toggle button and radio button. [2 M]


Unit 5: Activity and Multimedia with databases
Q.28. Name two classes used to play audio and video in Android.[2 M]
1) MediaPlayer
2) MediaController
3) AudioManager

Q.29. Describe Android service life cycle along with diagram. [4M] (S-22)

A service in Android runs in the background without direct interaction with the user.
It can perform tasks like downloads, data processing, or checking for updates.
Types of Services:

• Started Service: Started with startService(). It runs until stopped.


• Bound Service: Bound with bindService(). It allows other components to
interact with it.

Life Cycle of a Service:

1. onCreate()

• Called once when the service is created.


• Used for initial setup.
• If the service is already running, it won't be called again.

2. onStartCommand() (for started services)

• Called when you start the service with startService().


• The service runs in the background until explicitly stopped.

3. onBind() (for bound services)

• Called when a component binds to the service with bindService().


• Returns an IBinder object for communication.

4. onUnbind()

• Called when all clients disconnect from the service.

5. onRebind()

• Called when new clients bind to the service after unbinding.

6. onDestroy()

• Called just before the service is destroyed.


• Used to clean up resources.

Q.30. Describe multimedia framework of Android with diagram. [4M] (S-23, S-22)

• The system helps Android apps play audio and video smoothly.

• It includes:
o Multimedia Applications: Apps that use media (like music or videos).
o Framework: The layer that manages media data.
o OpenCore engine: Handles media processing.
o Hardware Abstraction: Connects software to hardware like speakers and
cameras.
• The framework uses core libraries (like libmedia, libmediajni) that communicate
with the Media Server via JNI (Java Native Interface).

• The Media Server manages actual media operations, creating services based on
the app’s requests.

• Communication between the app and Media Server is like a client/server model.
How Video/Audio Data Works

1. Java app sets the media file URI.


2. The media data is processed:
o Demux: Separates video and audio streams.
o Decode: Turns data into playable video/audio.
o Sync: Keeps audio and video synchronized.
o Send: Output the final media to the device.

Supported Formats & Protocols

• Container: Stores media data, like MP4, MP3.


• Audio Formats: Various codecs supported, depending on device.
• Network Protocols: Such as RTSP, HTTP, HTTPS for streaming media.

Q.31. Explain the activity life cycle. (W-22) 4Marks

Activities have a predefined life-cycle methods as follows:


• onCreate(): When the activity is first created. Used to set up the user interface
and initialize components.
• onStart(): When the activity becomes visible to the user.
• onResume(): When the activity comes to the foreground, and the user can interact
with it. Used to prepare resources or set up necessary things.
• onPause(): When another activity takes over, and this activity is about to go into
the background. Used to pause or release resources (like stopping a video or
saving data).
• onStop(): When the activity is no longer visible. Good for saving data or stopping
background tasks.
• onDestroy(): When the activity is about to be destroyed. Used to clean up
resources.
Q.32. Explain property animation method to animate the properties of view object
with example.(S-23) 4Marks
Property animation smoothly changes a view's property (like size, position, or color)
over a specified time. You specify:

• Which property to animate (e.g., position, transparency)


• How long the animation should last
• The start and end values of the property

You can also control:

• Duration: Time taken for the animation (default 300 ms).


• Repeat & reverse: Make animations repeat or go back and forth.
• Sets: Animate multiple properties together.
• Frame refresh: How often frames update for smoothness (by default, every 10
ms).
Example: Moving a Button to the right

Layout (activity_main.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:text="Move Me"
android:layout_centerInParent="true"/>

</RelativeLayout>
2. Java Code (MainActivity.java):
java
import android.os.Bundle;
import android.view.View;
import android.animation.ObjectAnimator;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

Button myButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

myButton = findViewById(R.id.myButton);

// Animate the button to move 300 pixels right over 1 second when clicked
myButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ObjectAnimator animation = ObjectAnimator.ofFloat(myButton,
"translationX", 0f, 300f);
animation.setDuration(1000); // 1 second
animation.start();
}
});
}
}

Q.33. State the use of fragments in android App development.(S-23) [2M]


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.

Q.34. State intent. List types of intent. (W-23) 2Marks


An Intent is like a message you send to ask another part of the app or another app to
do something, such as opening a new screen or sending data. It helps different app
components, like Activities, Services, and broadcast receivers, communicate and work
together smoothly.
Types:
1. Explicit Intent
2. Implicit Intent

Q.35. Define: i) Fragment ii) Broadcast receiver


i. Fragment:
o A fragment is a reusable UI component that represents a portion of an
activity.
o It is used for tabs, navigation drawers, or dynamic UI changes
ii. Broadcast receiver:
o It listens for systemwide or app specific events (like Sms Received or
Battery low) and trigger actions.
o It notified the user when broadcast is triggered.
Unit 6 Security and Application Development

Q.36. Define Geocoding and Reverse Geocoding. (W-23) 2 Marks


• Geocoding:
o Finding geographical coordinates (Longitude and latitude) of a given address
or location is called Geocoding.
o Used in map apps to pinpoint location or calculate distances.
• Reverse Geocoding:
o In these, when a pair of longitude and latitude is converted into an address or
location is called as Reverse Geocoding.
o Display nearest landmark for a GPC location.

Q.37. Describe the process of getting the map API key. (S-23 4 Marks)
1. Browse the site on your browser. https://console.developers.google.com/project
2. Login with your google account.
3. Create a new project by clicking on Create Project option.
4. Add your project name and organization name in the fields present on the screen.
5. Now click on APIs and Services.
6. Enable APIs and services.
7. Select Google maps Android API
8. To create an API key for Maps click on Create credentials option and then select the
API key option

Q.38. Describe permissions required for android application development. (S-23 4


Marks)
Types of Permissions

1. Install-time permissions

• Given automatically when the user installs the app.


• They allow basic access that doesn't harm privacy or system stability.
• Examples: normal permissions (like accessing the internet), signature
permissions (if apps are signed with the same key.

2. Runtime permissions (Dangerous permissions)

• Requested while the app is running, when needed.


• Needed for sensitive data like location, contacts, or camera.
• The user has to grant these permissions manually.

3. Special permissions

• For very powerful actions like drawing over other apps.


• Usually managed by device manufacturers or the platform.
How permissions work in the app:

• You declare needed permissions in the app's manifest file.


• Normal permissions are granted automatically.
• Dangerous permissions prompt the user for approval.

In brief:

• Apps need permission to access sensitive data or features.


• Some are granted automatically; others ask the user.
• Developers must include permissions in the manifest and request them
properly at runtime for sensitive actions.

Q.39. Define SMS service in android application development. (S-23 2 Marks)


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.

SmsManager smsManager = SmsManager.getDefault();


smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);

Q.40. Elaborate Android Security Model. (W-23) 4 Marks

Android Security Model Simplified:


• Each app runs separately: Every app runs in its own process, like its own
space, so apps don’t interfere with each other.
• Use of Linux security: Android uses Linux features like user IDs to keep
apps isolated and secure.
• Permissions: Apps must ask for permission to access personal data or features
like camera, contacts, or internet. These permissions protect user privacy.
• Sandboxing: Each app runs in a separate “sandbox” (small protected area), so
one app can’t access another’s data unless allowed.
• Signed apps: Every app is signed with a special key. This helps identify the
app’s owner and ensure it hasn’t been tampered with.
• User ID assignment: When you install an app, Android gives it a unique ID
that keeps it isolated from others. This prevents malicious apps from stealing
data.
• Resource listing: Apps must specify what resources (like files or data) they
will use when they’re installed.
• Protection levels: Permissions have different security levels, determining
when and how apps need to ask for access during runtime.

Q.41. Explain the procedure of Geo-coding and reverse Geo-coding. (W-22 4 Marks)

Geocoding Procedure
1. Input Address: User provides a place name or street address.
2. Send Request: The app sends this address to a geocoding service (like Google
Maps API).
3. Processing: The service converts the address into latitude and longitude
coordinates.
4. Receive Data: The app receives the coordinates and can use them for mapping or
other purposes.

Reverse Geocoding Procedure


1. Input Coordinates: User or app provides latitude and longitude.
2. Send Request: These coordinates are sent to a reverse geocoding service.
3. Processing: The service finds the closest address or place name for those
coordinates.
4. Receive Data: The app gets the address or place name for display or further use.

Q.42. Describe the process of getting the map API key. (S-23 4 Marks)
The API key is a unique identifier that authenticates requests associated with your
project for usage and billing purposes. You must have at least one API key associated
with your project.
1. Browse the site on your browser. https://console.developers.google.com/project
2. Login with your google account.
3. Create a new project by clicking on Create Project option.
4. Add your project name and organization name in the fields present on the screen.
5. Now click on APIs and Services.
6. Enable APIs and services.
7. Select Google maps Android API
8. To create an API key for Maps click on Create credentials option and then select the
API key option

Click on the API key option to generate your API key. After clicking on this option
your API key will be generated

Q.43. i) Describe all steps in application deployment on google play store. (S-23 4
Marks) (S-22 4 Marks)
ii) Write steps for customized permissions. (W-23 6 Marks)

i) Steps to Deploy an App on Google Play Store

1. Create a Developer Account


o Go to the Google Play Console.
o Sign in with your Google account and pay a one-time fee of $25 using an
international credit/debit card.
o After registration, it may take up to 48 hours for your account to be active.
2. Create a New App
o Click on “Create App” in the Play Console.
o Choose your app’s default language and give it a name (title).
o Fill in the basic information like app type (game or app), free or paid, etc.
3. Fill in App Details (Store Listing)
o Add a short and full description of your app.
o Upload app screenshots, icons, videos, and banners.
o Select your app’s category and add contact details.
o If your app uses user data, add a Privacy Policy URL.
4. Upload the APK or App Bundle
o Build your app (APK or AAB file) and upload it under “App Releases”.
o Choose the release type: internal testing, closed testing, open testing, or
production (final release).
o Upload the file and write release notes.
5. Set Content Rating
o Fill out a questionnaire to give your app an age-based rating.
o If you skip this step, your app may be removed or not shown in some
countries.
6. Set App Pricing and Countries
o Choose whether your app is free or paid.
o Select the countries where you want your app to be available.
o Note: You can change a paid app to free later, but not the other way
around.
7. Review and Publish the App
o Make sure all sections (store listing, content rating, pricing) are complete.
o Go to “Release” > “Production” and click “Review and Rollout”.
o Click “Confirm” to publish your app. It will go live after Google reviews
it.

ii) Write steps for customized permissions (6 Marks)


Custom permissions in Android allow an app to protect its components and data from
unauthorized access by other apps. Here's how to define and use them:

1. App Signing
o Every Android app (APK file) must be signed with a certificate.
o This certificate identifies the app’s author and is usually self-signed.
o App signing helps Android know who developed the app.
2. Unique User ID (UID)
o When an app is installed, Android gives it a unique user ID (UID).
o This UID helps Android manage file access and security for that app.
o The UID remains the same for that app on that device.
3. Defining Custom Permission
o You must define your custom permission in the AndroidManifest.xml
file using the <permission> tag.
o Example:

xml
CopyEdit
<permission

android:name="com.example.myapp.permission.DEADLY_ACTIVITY"
android:label="Deadly Activity"
android:description="Allows access to deadly activity"
android:protectionLevel="dangerous" />

4. Using Custom Permission in Components


o Apply this permission to activities, services, or content providers in the
manifest.
o Example:

xml
CopyEdit
<activity android:name=".DeadlyActivity"

android:permission="com.example.myapp.permission.DEADLY_ACTI
VITY" />

5. Types of Protection Levels


o Android provides different protectionLevel values like normal,
dangerous, signature, etc.
o dangerous means the user must allow the permission manually.
o signature means only apps signed with the same certificate can use it.
6. Effect of Custom Permission
o Only apps that declare and are granted your custom permission can access
the protected parts of your app.
o This improves security and controls access between apps.

Q.44.

You might also like