- Android Basics
- Android - Home
- Android - Overview
- Android - Environment Setup
- Android - Architecture
- Android - Application Components
- Android - Hello World Example
- Android - Resources
- Android - Activities
- Android - Services
- Android - Broadcast Receivers
- Android - Content Providers
- Android - Fragments
- Android - Intents/Filters
- Android - User Interface
- Android - UI Layouts
- Android - UI Controls
- Android - Event Handling
- Android - Styles and Themes
- Android - Custom Components
- Android Advanced Concepts
- Android - Drag and Drop
- Android - Notifications
- Location Based Services
- Android - Sending Email
- Android - Sending SMS
- Android - Phone Calls
- Publishing Android Application
- Android Useful Examples
- Android - Alert Dialoges
- Android - Animations
- Android - Audio Capture
- Android - AudioManager
- Android - Auto Complete
- Android - Best Practices
- Android - Bluetooth
- Android - Camera
- Android - Clipboard
- Android - Custom Fonts
- Android - Data Backup
- Android - Developer Tools
- Android - Emulator
- Android - Facebook Integration
- Android - Gestures
- Android - Google Maps
- Android - Image Effects
- Android - ImageSwitcher
- Android - Internal Storage
- Android - JetPlayer
- Android - JSON Parser
- Android - Linkedin Integration
- Android - Loading Spinner
- Android - Localization
- Android - Login Screen
- Android - MediaPlayer
- Android - Multitouch
- Android - Navigation
- Android - Network Connection
- Android - NFC Guide
- Android - PHP/MySQL
- Android - Progress Circle
- Android - ProgressBar
- Android - Push Notification
- Android - RenderScript
- Android - RSS Reader
- Android - Screen Cast
- Android - SDK Manager
- Android - Sensors
- Android - Session Management
- Android - Shared Preferences
- Android - SIP Protocol
- Android - Spelling Checker
- Android - SQLite Database
- Android - Support Library
- Android - Testing
- Android - Text to Speech
- Android - TextureView
- Android - Twitter Integration
- Android - UI Design
- Android - UI Patterns
- Android - UI Testing
- Android - WebView Layout
- Android - Wi-Fi
- Android - Widgets
- Android - XML Parsers
- Android Useful Resources
- Android - Questions and Answers
- Android - Useful Resources
- Android - Discussion
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.
Android Mock Test II
Q 1 -What is ANR in android?
A - When the application is not responding ANR will occur.
B - Dialog box is called as ANR.
C - When Android forcefully kills an application, it is called ANR
Answer : A
Explanation
When an Application is not responding ANR will be occur, and it will stop the process or an application
Q 2 - What are the functionalities in asyncTask in android?
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?
Answer : A
Explanation
In Android 3.0, It is having multi threads, but now it is having only one thread.
Q 4 - What is broadcast receiver in android?
A - It will react on broadcast announcements.
B - It will do background functionalities as services.
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?
Answer : B
Explanation
Broadcast Receiver by default runs on Main Thread only.
Q 6 - What is the time limit of broadcast receiver in android?
Answer : A
Explanation
Broadcast receiver has to do operation within 10 sec or else ANR will occur
Q 7 - How many broadcast receivers are available in android?
D - sendBroadcast(),sendOrderBroadcast(),and sendStickyBroadcast().
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.
Q 8 - What is the life cycle of broadcast receivers in android?
D - sendBroadcast(), sendOrderBroadcast(), and sendStickyBroadcast().
Answer : B
Explanation
Broadcast receiver has only onReceive() method. Broadcast starts from onRecieve() and control comes out from onRecieve().
Q 9 - What is the use of content provider in android?
A - To send the data from an application to another application
B - To store the data in a database
Answer : C
Explanation
Content provider is used to share the data between applications
Q 10 - How to access the context in android content provider?
A - Using getContext() in onCreate()
C - Using getApplicationContext() at anywhere in an application
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?
Answer : A
Explanation
In helper class, we can pass the version numbers in incremental order.
Q 12 - What is the difference between content values and cursor in android SQlite?
A - Content values are key pair values, which are updated or inserted in the database
B - Cursor is used to store the temporary result.
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?
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?
Answer : C
Explanation
The task is a collaboration of applications. It contains one or more applications in it
Q 15 - What is sleep mode in android?
Answer : A
Explanation
CPU will be in sleeping mode and it does not take any commands except radio interface layer and alarm from mobile.
Q 16 - What are the wake locks available in android?
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.
Q 17 - What is an anonymous class in android?
B - A class that does not have a name but have functionalities in it
Answer : B
Explanation
Anonymous class doesn't have class name but has some functionalities in it.
Q 18 - What is singleton class in android?
Answer : A
Explanation
There is only an object which can be accessed by all other class.
Q 19 -What is the application class in android?
Answer : D
Explanation
Application class is the base class for any android application.
Q 20 - Which features are considered while creating android application?
Answer : E
Explanation
Before creating an application, developers should consider screen size, input configuration, version, and device features
Q 21 -What is the 9 patch tool in android?
Answer : A
Explanation
We can change bitmap images to 9 sections as four corners, four edges and one axis.
Q 22 -What is JNI in android?
Answer : D
Explanation
Java Native interfaces are used to call native/cross applications, which are written in C and C++ languages.
Q 23 - Persist data can be stored in Android through
Answer : E
Explanation
We can store persist data in android in shared preferences, internal/external storage, SQlite, and Network servers.
Q 24 - How to get current location in android?
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?
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 |