• Android Video Tutorials

Android Mock Test



This section presents you various set of Mock Tests related to Android. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Android Mock Test II

Answer : A

Explanation

When an Application is not responding ANR will be occur, and it will stop the process or an application

Answer : E

Explanation

AsyncTask needs doInBackground() and remaining methods are optional. As a developer we should need to implement all methods which are given above.

Q 3 - How many threads are there in asyncTask in android?

A - Only one

B- Two

C - AsyncTask doesn't have tread

D - None of the Above

Answer : A

Explanation

In Android 3.0, It is having multi threads, but now it is having only one thread.

Answer : A

Explanation

It is a main component of android. It reacts on the system broadcast announcements, and it acts as a gateway between outside application environment with your application.

Q 5 - On which thread broadcast receivers will work in android?

A - Worker Thread

B - Main Thread

C - Activity Thread

D - None of the Above

Answer : B

Explanation

Broadcast Receiver by default runs on Main Thread only.

Q 6 - What is the time limit of broadcast receiver in android?

A - 10 sec

B - 15 sec

C - 5 sec

D - 1 hour

Answer : A

Explanation

Broadcast receiver has to do operation within 10 sec or else ANR will occur

Answer : D

Explanation

sendBroadcast() &miuns; It's normal broadcast.

sendOrderBroadcast() &miuns; It has an order priority

sendStickyBroadcast() &miuns; Intent passed with broadcast for future users.

Answer : B

Explanation

Broadcast receiver has only onReceive() method. Broadcast starts from onRecieve() and control comes out from onRecieve().

Answer : C

Explanation

Content provider is used to share the data between applications

Answer : D

Explanation

The getContext() method is used in onCreate() method and getApplicationContext() can be used anywhere in an application.

Q 11 - How to upgrade SQlite the database from a lower version to higher version in android SQlite?

A - Using helper Class

B - Using cursor

C - Using intent

D - None of the above

Answer : A

Explanation

In helper class, we can pass the version numbers in incremental order.

Answer : C

Explanation

Content values are named key pair values which is used to store the data, update the data in SQlite database. Cursor is a temporary buffering area to store the temporary result of android SQlite.

Q 13 - How to store heavy structured data in android?

A - Shared Preferences

B - Cursor

C - SQlite database

D - Not possible

Answer : C

Explanation

We can store structured data in SQlite database only. SQlite database is very efficient and faster to read and store the data.

Q 14 - How many applications are there in a given task in android?

A - Two

B - One

C - Many

D - Zero

Answer : C

Explanation

The task is a collaboration of applications. It contains one or more applications in it

Answer : A

Explanation

CPU will be in sleeping mode and it does not take any commands except radio interface layer and alarm from mobile.

Answer : E

Explanation

When CPU is on mode, PARTIAL_WAKE_LOCK will be active.

When CPU + bright Screen low is on mode, SCREEN_DIM_WAKE_LOCK will be active.

When CPU + bright Screen High is on mode,SCREEN_BRIGHT_WAKE_LOCK will be active.

When CPU, Screen, bright Screen High is on mode, FULL_WAKE_LOCK will be active.

Answer : B

Explanation

Anonymous class doesn't have class name but has some functionalities in it.

Answer : A

Explanation

There is only an object which can be accessed by all other class.

Answer : D

Explanation

Application class is the base class for any android application.

Q 20 - Which features are considered while creating android application?

A - Screen Size

B - Input configuration

C - Platform Version

D - Device features

E - All of above

Answer : E

Explanation

Before creating an application, developers should consider screen size, input configuration, version, and device features

Answer : A

Explanation

We can change bitmap images to 9 sections as four corners, four edges and one axis.

Answer : D

Explanation

Java Native interfaces are used to call native/cross applications, which are written in C and C++ languages.

Answer : E

Explanation

We can store persist data in android in shared preferences, internal/external storage, SQlite, and Network servers.

Answer : C

Explanation

GPRS and Location provider is used to fetch the current location of a phone as longitude and latitude.

Q 25 -Which permissions are required to get a location in android?

A - ACCESS_FINE and ACCESS_COARSE

B - GPRS permission

C - Internet permission

D - WIFI permission.

Answer : A

Explanation

To get a location of a phone, ACCESS_FINE and ACCESS_COARSE permission in manifest file are required. Without these permissions, we can't get the location of a mobile.

Answer Sheet

Question Number Answer Key
1 A
2 E
3 A
4 A
5 B
6 A
7 D
8 B
9 C
10 D
11 A
12 C
13 C
14 C
15 A
16 E
17 B
18 A
19 D
20 E
21 A
22 D
23 E
24 C
25 A
android_questions_answers.htm
Advertisements