Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

MAD IMP Questions

1. Describe android and importance of OHA.

Ans:

i. Android:
a. Android is open-source operating system.
b. It’s a handset based operating system. Such as mobile, tablet
etc.
c. It’s a modified version of Linux Kernel and other open
source software.
d. It is designed for touchscreen devices.

ii. OHA :
a. It’s a open handset alliance.
b. It is created for developing standards of open mobile
devices.
c. It is developed in 5 November 2007 by Google with 34
other companies.
d. It has now approx. 80 members including google,
Microsoft, intel, dell,HTC.

MAD FINAL QUESTIONS | K.S.Bhale


2. List IDE used for developing android application

Ans:

i. Intelij Idea
ii. Eclipse
iii. Android studio.

3. Describe Activity and manifest file.

Ans:

i. Activity:
a. Its an UI of android app.
b. In activity file we define user interface for our app.
c. We can implement all UI components in Activity file
d. Activity is media between actual data storage and user.
e. One activity implements the one page of the app.

ii. Manifest file:


a. It is responsible for protection of app.
b. It also declare android API which app going to use.
c. It lists instrumentation classes.
d. It specifies permissions required for our app.
e. It use to declare intent for particular activity.

MAD FINAL QUESTIONS | K.S.Bhale


4. Android UI components.

Ans:

i. Button
ii. Textview
iii. Edittext
iv. Radio button
v. Check box
vi. Radio group
vii. Toggle button

5. Features of android.

Ans:

i. NFC (near field communication): near by devices can


communicate easily
ii. Infrared Transmission: it allows to use our android phone as
remote
iii. Automation: it control our app permission and also automate
them
iv. Storage and battery swap: this devices has storage
extensation slots and replacable battery.
v. Beautiful UI: it gives beautiful UI
vi. Storage: it has light weight database storage.
vii. Multi – touch : it also supports multi touch.

MAD FINAL QUESTIONS | K.S.Bhale


viii. Multi – tasking: in it we can run various tasks simultaneously.
ix. Multi – language: supports single and bidirectional text.
x. Wifi direct: it pair with other devices directly, over high
bandwidtht network

6. Define Android Virtual Device (AVD).

Ans:

i. It’s a configuration that defines characteristics of android


phone, tablet, android TV etc.
ii. That we want to simulate in the emulator.
iii. We had Device Manager interface for managing our AVD.

7. Write directory path where our all images store while developing
android program

Ans:

i. Res/Drawable

MAD FINAL QUESTIONS | K.S.Bhale


8. List all attributes of simple button

Ans:

i. Android: id = unique name of button


ii. Android:layout_height = define height of button
iii. Android:layout_weidth = define width of button
iv. Android:text = define text on button
v. Android:onclick = define function which will execute after
button click
vi. Android:contentDescription = gives description of button.
vii. Android:visibility: defines initial visibility of the view.

9. Write syntax for intent – filter tag.

Ans:

<intent-filter android:icon = “drawable resource”

Action:label = “string resources”

Action:priority = “integer”>

</intent-filter>

10. Define services in android OS

Ans:

i. In android service is a long running background process.

MAD FINAL QUESTIONS | K.S.Bhale


ii. It doesn’t provide UI
iii. Runs in main thread of main process.
iv. It doesn’t create its own thread.
v. It starts when startService() method called.

11. Explain custom permission.

Ans:

i. It’s a permissions which programmer define for app.


ii. In it we can define any kind of permission for app such as,
opening new activity, loading some data etc.
iii. For defining such type of permissions we need to define it in
manifest file using inside <permission> attribute.

12. Describe multimedia framework.

Ans:

i. Android has a media playback engine at the native level.


ii. Audio video playback feature includes integration with
OpenMAX codecs, session management, transport control
etc.
iii. To set hardware path to encode and decode media you must
implement hardware – based codec.

MAD FINAL QUESTIONS | K.S.Bhale


13. Explain SQLite.

Ans:

i. It’s a library in android use to implement database.


ii. It’s a open source relational database, use to perform database
related operations.
iii. It store data in text file at user device.
iv. It supports all relational database feature.

14. Explain Geocoding.

Ans:

i. We can do Geocoding using Geocoding class.


ii. In it we can get user’s address as parameter.
iii. It returns the then geographical ordinate of that respective
address.
iv. Using this we get longitude, and latitude co – ordinates of
address
v. This process known as Geocoding.

MAD FINAL QUESTIONS | K.S.Bhale


15. Explain role of emulator.

Ans:

i. It simulates the android device on our pc so we can test our


application.
ii. It provide us a variety of devices so we can understand how
application react on different devices.
iii. It helps us to develop and test our application.

16. Explain string and layout file.

Ans:

i. String file:
a. The string file contains the strings or the text.
b. This text is displayed on different UI component such as
Textview, button, Radio button etc.
c. We can place the source of string inside component’s text.
d. Then we can mention that source in string file with string
we want to display.
ii. Layout file:
a. The layout file contains the complete UI of our activity.
b. Using this layout file we can create numbers of activity of
our application.
c. It contains declaration of all UI components and layouts
which displayed on activity.

MAD FINAL QUESTIONS | K.S.Bhale


17. Attributes of text view.

Ans:

i. Android:id = unique name of text view.


ii. Android:text = define text of text view.
iii. Android:layout_height = define height of text view.
iv. Android:layout_width = define width of text view.
v. Android:drawableRight = makes text view right drawable.
vi. Android:drawableBotton = makes text view bottom drawable.
vii. Android:autoText = it display auto text on text view.
viii. Android:contentDescription = it contains description of text
view.

18. List various classes of SMS telephony.

Ans:

i. Android.telephony.SmsManager

19. Describe need of android.

Ans:

i. Android market:
a. It’s a fastest growing market
b. We can get any type of app in android.
c. Using this apps we can improve functionality of our mobile.

MAD FINAL QUESTIONS | K.S.Bhale


ii. Customization:
a. Android provides best end – user experience in term of
customization.
b. Any one can create his own app for android to customize
his mobile.
iii. Rooting:
a. It helps to boosting performance of our mobile.
b. It make possible to change our system file which helps in
better customization
iv. The Android Community:
a. It provide any necessary help and support to help us.
b. They have limit less forum, blogs, websites and guides
written by experts.
v. Powerful Development Framework:
a. We can develop any app in it and deploy for all over the
globe.
b. It provides tools that helps us to make our app look great
and use hardware effectively..
vi. Global partnership and Large Installed base:
a. Its fastest growing Linux based mobile OS
b. Its openness has made it favorite for consumer and
developer.

MAD FINAL QUESTIONS | K.S.Bhale


20. List versions of android.

Ans:

Version Version name API level


1.0 Base 1
1.1 Base_1 2
1.5 Cupcake 3
1.6 Donut 4
2.0 – 2.1 Éclair 5–7
3.0 – 3.2.6 Honeycomb 11 – 13
4.0 – 4.0.4 Ice Cream Sandwich 14 – 15
4.4 – 4.4.4 KitKat 19 – 20
5.0 – 5.1.1 Lollipop 21 – 22
6.0 – 6.0.1 Marshmallow 23
7.0 Nougat 24
8.0 – 8.1 Oreo 26 – 27
9.0 Pie 28
10.0 Android 10 29

21. Explain ADT plugin in details.

Ans:

i. It’s a plugin for Eclipse IDE


ii. It gives us a powerful and integrated environment in which to
build android architecture.

MAD FINAL QUESTIONS | K.S.Bhale


22. Alignment attribute of relative layout.

Ans:

i. Android:layout_below
ii. Android:layout_alignRight
iii. Android:layout_alignBottom
iv. Android:layout_alignLeft
v. Android:layout_above
vi. Android:layout_alignParentEnd
vii. Android:layout_alignParentBottom
viii. Android:layout_alignParentLeft
ix. Android:layout_alignParentRight
x. Android:layout_alignParentStart

MAD FINAL QUESTIONS | K.S.Bhale


23. Hierarchical directory structure of android.

Ans:

App:

Manifest:

androidManifest.xml

java

MainActivity.java

Res:

Drawable:

Layout:

Activity_main.xml

Minmap:

Values:

String.xml

Colors.xml

Styles.xml

MAD FINAL QUESTIONS | K.S.Bhale


24. Explain Toggle Button.

Ans:

i. It’s a button has checked and unchecked state.


ii. It has light indicator for showing ON and OFF state.

25. Ways to handle database in android. Elaborate any one.

Ans:

i. We can manage database in android using helper class.


ii. For that we have SQLiteOpenHelper class.

26. Draw Activity Life cycle.

Ans:

MAD FINAL QUESTIONS | K.S.Bhale


27. List different types of View? Explain scroll View.

Ans:

i. Views:
a. List view
b. Grid view
c. Image view
d. Scrollview
ii. Scroll View:
a. It’s a view which can only contain one direct child.
b. This use to make child scrollable.
c. It has two types:
i. Vertical scroll view.
ii. Horizontal scroll view.

28. Name any four method to get location in android.

Ans:

i. GetLatitude():
ii. getLongitude():
iii. getAccuracy():
iv. getAltitude():
v. getSpeed():
vi. DistanceTo(Location destt):

MAD FINAL QUESTIONS | K.S.Bhale


29. Steps to develop Android Application.

Ans:

i. Open new project in android studio.


ii. Set name and location of application after selecting blank
activity.
iii. Then edit Activity_main.xml file as per our app’s UI
iv. Then manage all UI components in MainActivity.java file
v. Add some necessary content in Manifest file if needed.
vi. Then run the application
vii. Test it.
viii. Then our app development is complete

30. List layouts in android.

Ans:

i. Absolute layout
ii. Relative layout
iii. Table layout
iv. Linear layout
v. Frame layout.

MAD FINAL QUESTIONS | K.S.Bhale


31. Difference between match parent and wrap content.

Ans:

i. Match Parent:
a. It uses to set component with respect to its parent
b. Using it we can set height or width of component as respect
to its parent.
c. It expands the size of component.
ii. Wrap Content:
a. In it we set component with respect to its content.
b. Using it we can set height or width of component with
respect to its content.
c. It shrinks the size of component.

32. Define Intent.

Ans:

i. Intent is a messaging request object in android.


ii. Intent use to communicate between different app components.
iii. We can share our some content with other activities or other
components using intent.
iv. It has two types:
a. Implicit
b. Explicit.
33. Define Broadcast .

MAD FINAL QUESTIONS | K.S.Bhale


Ans:

i. It’s a third type of intent


ii. It’s a foreground operation that modifies what user currently
interacting with.
iii. We can send broadcast using sendBroadcast() method.

34. List sensors in android.

Ans:

i. Motion sensors:
a. Accelerometer
b. Gravity sensor.
ii. Environmental Sensor:
a. Barometer.
b. Photometer
c. Thermometer.
iii. Position Sensor:
a. Orientation sensor
b. magnetometer

MAD FINAL QUESTIONS | K.S.Bhale


4 Marks Question:
1. Draw and Describe android system architecture:

Ans:

i. Draw Architecture:
ii. Explain:
a. It’s a software stack of components to support mobile
device.
b. Components:
i. Applications:
1. Top layer of android
2. Contains User interface of app.
3. This layer runs android runtime using classes
and services.
ii. Application Framework:
1. It has classes use to create application
2. Manages Application resources and UI
3. Contain services like location, notification,
view system etc.
iii. Android Runtime:
1. Important part of android.
2. It contains android compiler Dalvik Virtual
machine (DVM) and some core libraries.
3. It power ups application using this libraries

MAD FINAL QUESTIONS | K.S.Bhale


iv. Platform Libraries:
1. It includes various C/C++ libraries and java
based librarires.
2. It provide support for an android development

v. Linux Kernal:
1. Bottom layer of architecture.
2. It manages all drives during runtime
3. It provides abstraction layer between this
architecture and hardware

2. Draw and Describe android directory structure:

Ans:

App:

Manifest:

androidManifest.xml

java

MainActivity.java

Res:

Drawable:

Layout:

Activity_main.xml

MAD FINAL QUESTIONS | K.S.Bhale


Minmap:

Values:

String.xml

Colors.xml

Styles.xml

i. This android directory hierarchy.


ii. In it ‘App’ folder consist all required files for developing
android application.
iii. Inside it there is ‘Manifest’ folder contains
‘AndroidManifest.xml’ file which responsible for app’s
security and permissions.
iv. Next there is ‘Java’ folder. Which contain ‘MainActivity.java’
file which contains functionality of app
v. Next there is ‘Res’ folder which contains several sub folder
vi. It contains ‘drawable’ folder which contains all images.
vii. Next it has ‘layout’ folder which contains activity designs of
application.
viii. Then there is ‘minmap’ and ‘values’ folder which also has
their own responsibility in android development.

MAD FINAL QUESTIONS | K.S.Bhale


3. Explain DVM with diagram:

Ans:

i. DVM is a Dalvik Virtual Machine


ii. It is used in android programming to create .apk file from given
source code.
iii. DVM is a Register based Virtual Machine.
iv. That’s why its instructions size is larger as compare to JVM.
v. It can compiled all source code files and convert it into bytecode
(.class) file as like JVM.
vi. Then DEX Converter (dx tool) convert bytecode in to Dalvik
bytecode (classes.dex)
vii. Then this file is use to create .apk file
viii. It only works with Android Operating System.

MAD FINAL QUESTIONS | K.S.Bhale


4. Use of android manifest file:

Ans:

i. Every project in android consists its manifest file.


ii. It defines the structure and meta data of application.
iii. This file includes nodes for each Activities, services, content
provider and broadcast receiver.
iv. Using Intent – filter and permissions we manage their
behaviour.

5. Compare JVM and DVM:

Ans:

JVM (Java Virtual Machine) DVM (Dalvik Virtual Machine)

Stack Based Virtual Machine Register Based Virtual Machine

It first converts all source code file into


Java source code first convert into
bytecode(.class) then it converts all
bytecode(.class) then convert into
bytecode file into Dalvik bytecode
machine code
(classes.dex) then it creates an .apk file

More information required for Data Instruction size is larger as it need to


Loading and Manipulating, as well as encode source code and use
methods loading. designation register.

Executable file for the device is .jar Executable file for the devices is .apk
file file

MAD FINAL QUESTIONS | K.S.Bhale


Compiled bytecode size is compact. Compiled bytecode size is larger

Support multiple operating systems Supports android operating system.

6. Describe Frame and Linear Layout:

Ans:

i. Frame Layout:
a. It’s a placeholder on screen that use to display single view.
b. It is used to block out an area on the screen to display single
view.
c. It is designed to hold single child
d. If we want to put multiple child in it then we need to use
‘gravity’ attribute for managing them

ii. Linear Layout:


a. It’s a layout in which all components are arrange in
particular way.
b. We can put all childs in vertical or in horizontal way.
c. Using ‘orientation’ attribute we can change orientation of
the linear layout.

MAD FINAL QUESTIONS | K.S.Bhale


7. Explain screen components:

Ans:

i. Activities:
a. It’s a single screen with user interface.
b. It use to perform some kind of operation on screen.
c. If application has many activities then one of them declared
as MainActivity.

ii. Services:
a. It’s a component which runs in background.
b. It’s a long running process.
c. It always executes on main thread of its process.

iii. BroadCast Receiver:


a. It’s a simply response to a broadcast messages from other
application
b. It’s a foreground operation with what user interacting with.
c. We send broadcast using sendBroadcast()

iv. Content Provider:


a. It’s a kind of database which has collection of data.
b. It provide data to other application or application
components.
c. It’s a kind a application which designed for data storage.

MAD FINAL QUESTIONS | K.S.Bhale


8. Explain Intent and Fragment:

Ans:

i. Intent:
a. It’s a messaging request object in android.
b. It is use to communicate with another application
components.
c. We can send data or request some operation using this
intents.
d. The intent handler are use to handle intent request from
another app
e. There are 2 types of intent in android:
i. Implicit Intent: (didn’t have target component)
ii. Explicit Intent: (already has target component)

ii. Fragment:
a. It’s a modular section of activity.
b. It is use to divide our Activity in particular sections.
c. We can create numbers of fragment in one activity
d. We can use fragments of one activity into another one.
e. We can implement it with out any UI
f. It has its own life cycle.
g. We add fragment using <fragment> attribute

MAD FINAL QUESTIONS | K.S.Bhale


9. Enlist steps to publish android application.

Ans:

i. First generate signed APK of your android app.

ii. Now we need to sign up to Google Play Console to publish


and manage our app.

iii. Login with your Gmail account that you want to use for
publishing app.

iv. Agree the terms of google play store.

v. Now we need to pay one time ‘Developer Registration’ fee


which is $25. For that fill credit card details.

vi. Complete your account details for google developer account.

vii. Now fill store listing details of your app which include Title,
Short Description, and Full Description.

viii. After this we need to add app’s screen shot to it. Minimum 2,
maximum 8

ix. After this we need to add high definition icon or logo of app.
x. Now scroll down and feel other remaining details includes
type, category, website, email and phone no.

xi. Then check privacy policy then click on save draft to save
our work so for.

xii. Now go on app release and click on manage production.

MAD FINAL QUESTIONS | K.S.Bhale


xiii. Now you will se create release now click on it.

xiv. After this we see browse files click on it and upload your
signed APK.

xv. After complete upload click on review.

xvi. Now go to content rating and click on continue.

xvii. Now select violence, sexuality, language, controlled


substance etc on your app.

xviii. First click on save questionnaire for save and then click on
calculate rating.

xix. Now click on apply rating.

xx. Then click on pricing and distribution and select free/paid


as per your choice.

xxi. Now scroll down and check all * mandatory fields and then
click on save draft.

xxii. Now click on ready on publish with save draft and click on
manage release.

xxiii. Then click on manage production

xxiv. Then click on edit release.

xxv. Now click on review.

xxvi. After review click on rollout to production.

MAD FINAL QUESTIONS | K.S.Bhale


xxvii. Now we need to confirm. After this we need to wait for one
hour for approval.

10. Explain two UI components with example:

Ans:

i. Button:
a. It’s a clickable UI component.
b. We can use it for doing some event handling.
c. Example:

<Button android:id = “@+id/btn”

Android:layout_height = “wrap_content”

Android:layout_width = “wrap_content”

Android:text = “click”

Android:onClick = “myfun” />

ii. TextView:
a. It’s a read only text editor
b. We use to display labels on activity.
c. We can also show some results using it.
d. Example:

<TextView android:id = “@+id/tview”

Android:layout_height = “wrap_content”

Android:layout_width = “wrap_content”

MAD FINAL QUESTIONS | K.S.Bhale


Android:text = “mytextview”

Android:textSize = “30dp” />

iii. Edittext:
a. It’s a editable text editor.
b. We use it to get input from user.
c. It has different input options such as number, text, date
etc.
d. Example:

<EditText android:id = “@+id/eview”

Android:layout_height = “wrap_content”

Android:layout_width = “wrap_content”

Android:hint = “Enter Input”

Android:ems = “10”

Android:inputType = “number” />

11. Describe location based services:

Ans:

i. Using this services we can get location details such as longitude,


latitude co – ordinates, speed, directions etc.
ii. We can get current location using this service

MAD FINAL QUESTIONS | K.S.Bhale


iii. For connecting to location service we use Connect() method of
locationClint class.
iv. Then for getting our last location use getLastLocation() method.
v. We can access google map.
vi. It has zooming features, also has markers for location
identification.
vii. It also has Geocoding and reverse Geocoding features by which
we can get address in any format we want.
viii. It also access GPS and gives us better experience.

12. Explain 4 methods of Toast:

Ans:

i. makeText():
a. this method use to set text to toast.
b. This method also use to set timing of toast.
c. Syntax:
i. Toast.makeText(context, msg, toast.length)
ii. Show():
a. This method is use to show the toast.
b. This method didn’t accept any parameter
c. It didn’t return any value.
d. Syntax: toast.show()
iii. setDuration():
a. this method use to set timing of toast.

MAD FINAL QUESTIONS | K.S.Bhale


b. It has integer parameter of timing
c. It didn’t return any value.
d. Syntax: toast.setDuration(toast.<duration>)
iv. setMargin():
a. this method use to set margin of toast.
b. It has X, Y coordinate for setting location of toast.
c. It didn’t return any value.
d. Syntax: toast.setMargin(<x coordinate>, <y
coordinate>)

13. Explain Radio button and Radio group:

Ans:

i. Radio Button:
1. This is Android UI component
2. It is a button which has On/ Off or checked/
unchecked states.
3. We can only select one radio button from
collection.
4. Attributes:
a. Android:checked = if true then radio
button checked by default.
b. Android:id = unique name of radio
button
5. Example:

MAD FINAL QUESTIONS | K.S.Bhale


<RadioButton android:id = “@+id/rbtn”
Android:text = “rbutton”
Android:layout_height = “wrap_content”
Android:layout_widht = “wrap_content”
Android:checked = “true” />
ii. Radio Group:
1. It is UI component of android
2. It is collection of number of radio button.
3. We can select only one radio button from radio
group.
4. Attribute:
a. Android:id = unique name of radio
group.
b. Android:checkedButton = id of radio
button to make it by default checked.
5. Example:
<RadioGroup android:id = “@+id/rgroup”
Android:layout_height = “match_parent”
Android:layout_widht = “wrap_content”>
<RadioButton
…….
…….
/>
</radioGroup>

MAD FINAL QUESTIONS | K.S.Bhale


14. Explain Implicit and explicit Intent:

Ans:

i. Implicit Intent:
a. It specifies an action to be performed, and may be data
provided with it.
b. It doesn’t specify the target component or any class on which
this action will perform.
c. Android runtime matches the given intent request with present
intent handler.
▪ Example: While filling any form there is need to
upload some document then after clicking on it our
file explorer open automatically.

d. If there is numbers of choices of intent handler then App


chooser opens and let the user to choose.
▪ Example: while sharing any file after clicking share
there is several options presents such as Bluetooth,
Drive, Gmail, WhatsApp etc.
e. Syntax:
▪ Intent <intent_Name> = new
Intent(Intent.<Action_Specified>);
▪ startActivity(<intent_Name>);

ii. Explicit Intent:

MAD FINAL QUESTIONS | K.S.Bhale


a. It use to launch specific app component.
b. In it we need to specify component name for intent object.
c. Example:
▪ Intent <intent_Name> = new
Intent(<context>,<Target_class/component>);
▪ setActivity(<intent_Name>);

15. Explain Activity Life Cycle with diagram:

Ans:

i. Diagram:
ii. Explain:
a. Activity States and App Visibility:
i. Created (not visible yet)
ii. Started (visible)
iii. Resume (visible)
iv. Paused (partially invisible)
v. Stopped (hidden)
vi. Destroyed (gone from memory)
1. onCreate() – Activity Created.
a. Called when activity first created.
b. Does all static setup: create views, bind
data to list…
c. Only called once during an activity’s
lifetime

MAD FINAL QUESTIONS | K.S.Bhale


d. Takes a bundle with activity’s previously
frozen state, if there was one.

2. onStart() – Activity Started.


a. Called when activity become visible to
user.
b. Can be called more than once during
execution.
c. Followed by onResume() if activity comes
to the foreground, or onStop() if it
becomes hidden.

3. onRestart() – Activity Started.


a. Called after activity has been stopped,
immediately before it is started.
b. Transient state.
c. Always followed by onStart()

4. onResume() – Activity Resumed / Running


a. Called when activity will start interacting
with user
b. Activity has moved to top of the activity
stack.
c. Starts accepting user input.
d. Running state.

MAD FINAL QUESTIONS | K.S.Bhale


e. Always followed by onPause().

5. onPause() – Activity Paused


a. Called when activity on pause previous
activity
b. Used to commit unsaved changes to
persistent data.
c. Stop all operations which consume
resources.
d. Fast implementation.
e. Followed by onResume(), if activity
returns back to the front.
f. Or by onStop(), if it becomes invisible to
the user.

6. onStop() – Activity Stopped


a. Called when activity no longer visible to
user.
b. Called when operations are to heavy for
onPause().
c. Followed by onRestart() or by onDestroy()

7. onDestroy() – Activity Destroyed.


a. Final call before activity is destroyed.

MAD FINAL QUESTIONS | K.S.Bhale


b. Activity is finishing or system is
destroying it to save space.
c. Call isFinishing() method to check.
d. Use onPause() or onStop() to save data or
state

16. Define Content Provider and Fragment:

Ans:

Content Provider:

i. It is a provider who supplies data from one application to another.


ii. Such requests are handled by the methods of the Content Resolver
class.
iii. A content Provider:
i. Separates data from app Interface.
ii. Provides standard way of accessing the data.
iii. Make possible to share data with another apps.
iv. This is useful for apps who want to make data available to
other apps.
v. Using it you can securely use and modify single data source
by another apps
vi. Its centralize place of data from where any app can access
data.
vii. Its more like a database, most cases this data is stored in an
SQLite database.

MAD FINAL QUESTIONS | K.S.Bhale


Fragment:

A Fragment is a piece of an activity which enable more


modular activity design. It will not be wrong if we say, a
fragment is a kind of sub-activity.

Following are important points about fragment −

• A fragment has its own layout and its own behaviour with its
own life cycle callbacks.
• You can add or remove fragments in an activity while the
activity is running.
• You can combine multiple fragments in a single activity to
build a multi-pane UI.
• A fragment can be used in multiple activities.
• Fragment life cycle is closely related to the life cycle of its
host activity which means when the activity is paused, all the
fragments available in the activity will also be stopped.
• A fragment can implement a behaviour that has no user
interface component.

MAD FINAL QUESTIONS | K.S.Bhale


17. Describe types of permissions while developing android
application:

Ans:

i. Install time permissions:


a. It gives limited access of data to app
b. This permission given to app at install time automatically.
c. It also contains some normal and signature permission.

ii. Normal Permission:


a. It gives access to data and actions which extends the app’s
sandbox.
b. The normal protection level assign to normal permissions.

iii. Signature Permission:


a. While installing if app declares signature permission which
given to another app.
b. Then it checks if both app are developed under same
certificate then it get its signature permission.

iv. Runtime Permission:


a. It also known as dangerous permission
b. It gives additional access to restricted data to our app.
c. This access may be affect system and other app.

MAD FINAL QUESTIONS | K.S.Bhale


18. Steps to install Android Studio and sdk:

Ans:

i. Download the android studio first.


ii. Agree the agreement and start downloading.
iii. After downloading open downloaded file and click next.
iv. Add path for installation then click next.
v. It will then start installation.
vi. Then click next and click finish
vii. After this it will ask for importing setting, then check ‘do not
import setting’ and click ok
viii. Then android studio starts.
ix. Then it will file available sdk if present then it will download
some missing files of it. Or it will download whole new SDK
x. Then new ‘welcome’ dialog box open then click next.
xi. Then check standard install settings and click next.
xii. Then choose UI theme.
xiii. Then we need to download SDK components.
xiv. After complete download click finish
xv. Then start android studio and start new project.

MAD FINAL QUESTIONS | K.S.Bhale


19. Explain Date and Time Picker with its method and syntax:

Ans:

i. DatePicker: allows you to select day, month and year in your


custom UI. For this we have Date Picker and DatePickerDialog
components.
ii. Methods:
a. getDayOfMonth(): gets selected day of month.
b. getMonth(): gets the selected month.
c. getYear(): gets the selected year.
d. setMaxDate(long maxdate): this sets maximum date
supported by datepicker.
e. setMinDate(long mindate): this sets minimum date
supported by datepicker.
f. updateDate(int year, int month, int day): updates the current
date.
g. getCalenderView(): this returns view of calender.
h. getFirstDayOfWeek(): method returns first day of the week.
iii. Time Picker: allows you select hours, minute, seconds in your
custom UI. For this we have TimePicker and
TimePickerDialog components.
iv. Methods:
a. Is24HourView(): return true if time is in 24 hours.
b. isEnable(): this returns enable status of view.
c. setCurrentHour(int Crhour): sets the current hour.
d. setCurrentMinute(int Crmin): sets current minute.

MAD FINAL QUESTIONS | K.S.Bhale


e. setEnable(Boolean enable): set view enable.
f. Setis24HourView(Boolean is24Hour): sets 24 hour view.

20. Describe significance of SQLite database in android:

Ans:

i. SQLite database is an open – source relational database.


ii. Used to perform database operations on android.
iii. It embedded in android by default.
iv. There is no need to perform any other setup like JDBC, ODBC.
v. SQLiteOpenHelper class provides functionalities to use SQLite
dastabase.
vi. It stores data to user device in text file.
vii. It supports all relational database features.

21. List sensors in android and explain any one:

Ans:

i. Most of android devices has their own sensors.


ii. This sensors provide a raw data with accuracy and useful to
monitor 3D devices.
a. Types of sensors:
a. Motion Sensors:
i. It measure acceleration and
rotational forces.
ii. Example: accelerometers, gravity
sensor, rotational vector sensor

MAD FINAL QUESTIONS | K.S.Bhale


b. Environmental Sensors:
i. Measure environmental parameters
such as temperature, pressure
humidity etc.
ii. Example: barometers, photometers,
ther-mometers etc

c. Position Sensors:
i. Sense physical position device.
ii. Example: orientation sensor,
magnetome-ters.
iii. Android has sensor framework to access all available sen-sors.

MAD FINAL QUESTIONS | K.S.Bhale


22. Explain Zoom control (in/out) with example

Ans: (example in code file)

i. this class used for zooming and return callback to register for
events.
ii. It has 2 buttons ZoomIn and ZoomOut which are used to control
the zooming functionality.
iii. Zoom control XML code.

<ZoomControls

Android:id = “@+id/zoomid”

Android:layout_width= “wrap_content”

Android:layout_height = “wrap_content”/>

iv. Zoom control methods:


a. Hide(): it is use to hide zoom control from the screen.
b. Show(): it is use to show zoom controls which hide from
the screen.

MAD FINAL QUESTIONS | K.S.Bhale


23. Explain Geocoding and Reverse Geocoding

Ans:

i. We can do this using Geocoder class.


ii. Finding geographical co – ordinates of specific address of
location is known as Geocoding.
iii. and reverse to this convert longitude and latitude co – ordinates
into an address of location is known as Reverse Geocoding.
iv. Geocoder class present in android.location.Geocoder package.
v. This both operation should be always run of different thread
instead of UI thread or it may crash the app.

vi. Geocoder code:

Geocoder gc = new Geocoder(context);


If(gc.isPresent()){
List <Address> list = gc.getFromLocationName(“155 Park Theater, Palo Alto, CA”,1)
Address address = list.get(0);
Double lat = address.getLatitude();
Double lng = address.getLongitude();
}

vii. Reverse Geocoder code:

Geocoder gc = new Geocoder(context);


If(gc.isPresent()){
List <Address> list = gc.getFromLocationName(“155 Park Theater, Palo Alto, CA”,1)
Address address = list.get(0);
Double lat = address.getLatitude();
Double lng = address.getLongitude();
}
Geocoder gc = new Geocoder(context);
If(gc.isPresent()){
List <Address> list = gc.getFromLocation(37.42279,122.085606,1)
Address address = list.get(0);

MAD FINAL QUESTIONS | K.S.Bhale


StringBuffer str = new StringBuffer();
Str.append(“Name: “+ address.getLocality()+”/n”);
Str.append(“Sub – Admin Area: “+ address.getSubAdminArea()+”/n”);
Str.append(“Admin Area: “+ address.getAdminArea()+”/n”);
Str.append(“Country: “+ address.getCountryName()+”/n”);
Str.append(“Country Code: “+ address.getCountryCode()+”/n”);
String strAddress = str.toString();
}

24. Explain android Eco System

Ans:
i. Android ecosystem means the relationship between Users,
Developers, and Hardware equipments.
ii. Their relationship, dependence is known as android ecosystem
iii. The main block of android ecosystem is:
a. Android User:
i. Android user have more space for customizability.
ii. Android users are smarter than another users as they
perceived greater level of support
iii. Android user prefer to save cost and love the openness
of platform

b. Developer:
i. This are professional software developer.
ii. Following role played by developer:
1. Design and build advance android app

MAD FINAL QUESTIONS | K.S.Bhale


2. For new cool features collaborate other
development teams
3. Troubleshoot and fix bugs in new and existing
and app.

c. Equipment Maker:
i. Android equipment present in huge number in market.
ii. Smartwatches: this watches has android os in it. They
connected to our smart phone.
iii. Smart TV: its just like a small computer on which we
can stream content locally and online.
iv. Smart Speaker: its just like google Alexa.

MAD FINAL QUESTIONS | K.S.Bhale


25. Describe Service Life Cycle

Ans:
i. Diagram:

MAD FINAL QUESTIONS | K.S.Bhale


ii. Explanations:
a. First diagram shows service created using startService()
method
b. Then onCreate() method creates the service.
c. Then onStart() method starts the service
d. And the onDestroy() method destroy the service.
e. Then service shut downs
f. And second diagram shows service created using
bindService()
g. Then onCreate() method creates the service.
h. Then onBind() method bind the service with the app
components
i. Then onUnbind() method call for unbinding method.
j. We can call onRebind() method for rebinding method with
component.
k. After unbinding all services we can destroy service using
onDestroy() method.

MAD FINAL QUESTIONS | K.S.Bhale


26. Difference between list view and grid view.

Ans:
List View Grid View
In it we can see content in In in we can see content in the rows
list and column
In it we not need to define Here we need to define column
column numbers numbers
Here we only need to define Here we need to define columns,
divider their width and specings.
Example: contact list Example: gallery.
Code of listview Code of grid view

MAD FINAL QUESTIONS | K.S.Bhale


6 Marks Question:
1. Describe linear and Frame Layout.

Ans:
i. Frame Layout:
a. It’s a placeholder on screen that use to display single view.
b. It is used to block out an area on the screen to display single
view.
c. It is designed to hold single child
d. If we want to put multiple child in it then we need to use
‘gravity’ attribute for managing them
e. Frame Layout Code (xml file)

ii. Linear Layout:


a. It’s a layout in which all components are arrange in
particular way.
b. We can put all childs in vertical or in horizontal way.
c. Using ‘orientation’ attribute we can change orientation of
the linear layout.
d. Linear Layout Code (xml file)

MAD FINAL QUESTIONS | K.S.Bhale


2. Define role of publisher in android application deployment.

Ans:
I. Preparing your app for release:
a. It has following tasks:
i. Configuring your application for release.
ii. Building and signing a release version of your app
iii. Testing the release version of your application
iv. Preparing remote servers and services that your app
needed.
b. We also need to do some other task for preparation process
such as:
i. Getting private key for signing our application.
ii. Need to create icon for application
iii. We may need to prepare End User License Agreement
(EULA) to protect user, organization.
c. After all of this we need to prepare signing .apk file of our
release.
II. Releasing Your App to user.
a. You can release your application in several
b. Generally we release our app through application market
place such as Google Play.
c. But we can also release on our own website.
d. Releasing on google play has following steps:
i. Preparing promotional materials.
ii. Configuring options and uploading assets

MAD FINAL QUESTIONS | K.S.Bhale


iii. Publishing the release version of our app.

MAD FINAL QUESTIONS | K.S.Bhale

You might also like