- 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 III
Q 1 -What is LastKnownLocation in android?
A - To find the last location of a phone
B - To find known location of a phone
Answer : C
To find the last known location of a phone we need to use LastKnownLocation, the syntax is as shown below.
Location location = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
Q 2 - WHich method is used to find GPS enabled or disabled pro-grammatically in android?
Answer : C
The onProviderDisable() method is used to find whether GPS is enabled or disabled in android pro-grammatically
Q 3 - What is a base adapter in android?
A - Base Adapter is a common class for any adapter, which can we use for both ListView and spinner
Answer : A
Base Adapter is a common class for any adapter. We can use a base adapter for both listView and spinner. It has some methods as shown below
getView() getList() getItem() getCount()
Q 4 - What is breakpoint in android?
Answer : C
Breaks the execution to find the debug value, It is one of the debugging techniques.
Q 5 - What is DDMS in android?
Answer : D
DDMS provides port forwarding, screen capturing, memory mapping, logcat, calls, SMS etc.
Q 6 - What is log message in android?
Answer : A
The log message is used to debug a program. Some of log messages are shown below
log.d-Debugging log log.i Informative log log.e-Error log log.w-Warning log log.v-verbose log
Q 7 - What is ADB in android?
Answer : C
Android debug bridge is a client and a server modelled tool and acts as a bridge between client and server.
Answer : A
Every emulator or device is allocated by 2 ports based on port availability.
Q 9 - What is APK in android?
Answer : C
APK is an android packaging kit. We can pack/zip, our code in apk format to work on Android devices as an application.
Q 10 - What are the debugging techniques available in android?
Answer : D
DDMS, Breaking Point and Memory profiling are the three debugging techniques available in Android. Based on requirement, we can use debugging techniques, each technique is having different capabilities to debug.
Q 11 - How to fix crash using log cat in android?
B - log cat contains the exception name along with the line number
Answer : B
Using with log cat, we can find the exception, which has occurred along with the line number. Using of line number, we can find the errors.
Q 12 - What are the functionalities of HTTP Client interface in android?
Answer : D
HTTP Client has the capabilities to manage connections, cookies and Authentication.
Q 13 - What is an HTTP client class in android?
A - httprequest(get/post) and returns response from the server
Answer : A
Http request has get and post methods and it returns the response from the servers.
Q 14 - What does httpclient.execute() returns in android?
Answer : B
Httpclient.execute() executes only once and it will return http response from the server or device, Http entity is embedded the body of the Http response.
Answer : D
org.json is the package name of JSON object and JSON array
Q 16 - What is the package name of HTTP client in android?
Answer : B
org.apache.http.client is the package name of HTTP client.
Q 17 - Data can be read from local source XML in android through
Answer : A
Using with XML resource parser, we can read local resource XML in android.
Q 18 - What is the library of Map View in android?
Answer : D
com.google.android.maps is the library of the map view in android. We can access google maps by calling this library.
Q 19 - In which technique, we can refresh the dynamic content in android?
Answer : B
Using with Ajax technology, we can refresh the dynamic data in web pages.
Answer : C
JSON is Java Script Object Notation with which we can exchange data between two systems in the connected network.
Q 21 - What are the JSON elements in android?
Answer : D
Json elements are Number, string, boolean, null, array, and object
Q 22 - What is the HTTP response error code status in android?
Answer : C
HTTP status code >= 400 means error else success. Status code 404 means page not found
Q 23 - What is the JSON exception in android?
Answer : A
Json exception can be thrown while parsing JSON response from the server.
Q 24 - How to find the JSON element length in android JSON?
Answer : D
Using length(), we can find the number of elements are in JSON.
Q 25 - What is a GCM in android?
Answer : A
Using with google could messaging, we can push the data from the servers to client devices. In short, we can send messages to mobile devices through the cloud(Push Notification).
Answer Sheet
Question Number | Answer Key |
---|---|
1 | C |
2 | C |
3 | A |
4 | C |
5 | D |
6 | A |
7 | C |
8 | A |
9 | C |
10 | D |
11 | B |
12 | D |
13 | A |
14 | B |
15 | D |
16 | B |
17 | A |
18 | D |
19 | B |
20 | C |
21 | D |
22 | C |
23 | A |
24 | D |
25 | A |