- 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 IV
Answer : B
Fragment is a peace of an activity. If you want to move your application in 360 degrees, you can do this by using a fragment.
Q 2 - Fragment in Android can be found through
Answer : D
Using FragmentManager.findFragmentByID(R.id.fragment), we can find the fragment/fragments which are placed on the layout
Answer : A
According to the Google documentation, Android supports 4 types of orientations, those are landscape, portrait, sensor and No orientation
Q 4 - What is fragment life cycle in android?
C - onAttach()->onCreate() −> onCreateView() −> onActivityCreated() −> onStart() −> onResume()
Answer : C
Fragment life cycle is as shown below −
onAttach() OnCreate() onCreateView() onActivityCreated() onStart() onResume() onPause() onStop() onDestroyView() onDestroy() onDetach()
Q 5 - What is sandbox in android?
A - Each application runs securely in sandbox without interrupting another process
Answer : A
Each application runs securely in sandbox without interrupting another process. If an application is running in a sandbox, outside application can't touch sandbox application
Q 6 - How many levels of securities are there in android?
Answer : A
Android is having two levels of securities, they are as App level security and kernel level security
Q 7 - How many protection levels are available in the android permission tag?
A - There are no permission tags available in android
B - Normal, kernel, application
Answer : C
Android is having four levels of protection in android permission tag. They are normal, dangerous, signature, and signatureOrsystem
Q 8 - What is the purpose of super.onCreate() in android?
B - To create a graphical window for subclass
Answer : B
The super.onCreate() will create the graphical window for subclasses and place at onCreate() method.
Q 9 - Is it mandatory to call onCreate() and onStart() in android?
A - No, we can write the program without writing onCreate() and onStart()
B - Yes, we should call onCreate() and onStart() to write the program
Answer : A
It is not mandatory, the program will work perfectly without fail, but the programmer has to implement the life cycle of activity.
Q 10 - Is it possible activity without UI in android?
Answer : B
Without UI, we can call an activity, It will do some background functionalities.
Q 11 -What are return types of startActivityForResult() in android?
Answer : D
strartActivityforResult() returns RESULT_OK and RESULT_CANCEL.
Answer : B
ANR responding time is 5 sec. If an application is not responding within 5 sec, ANR will occur
Q 13 - What is transient data in android?
Answer : D
Transient data is logical data and we can store application logic in it.
Q 14 - Why don't we give MIN SDK as 1 in android?
A - Android deprecated version
Answer : A
Android version 2.2 is deprecated so we don't need to call MIN version to be 1
Q 15 - What are commands needed to create APK in android?
A - No need to write any commands
B - Create apk_android in command line
Answer : C
Using with Javac, we can compile Java files
Use dx tool to convert all Java class files to single dex file
Use AAPT tool to create apk file
Sign the apk file by using jar signer
Zipalign of signed apk
Q 16 - How do you join two notifications in android?
A - Give same id for both notifications
B - Write notification code two times
Answer : E
Give same id for both notifications.
nm.notify(1,notification);
Q 17 - What is the main difference between set and list in android?
B - Set can't contain duplicate values
Answer : D
Set can't contain duplicate values. Examples of set are hashset,treeset and linked hash set
The list contains duplicate values. Example of list is linked list and array list
Q 18 - What is an interface in android?
A - Interface acts as a bridge between class and the outside world.
Answer : A
The Interface acts as a bridge between class and the outside world. Interface contains method declaration, nested types, and constants.
Q 19 - What is anchor view?
B - provides the information on respective relative positions
Answer : B
Anchor View provides the information on respective relative positions of views.
Q 20 - What is the life cycle of foreground activity in android?
A - onCreate() −> onStart() −> onResume() −> onStop() −> onRestart
B - onCreate() −> onStart() −> onResume() −>onStop()
Answer : C
Foreground activity should be onCreate() −> onStart() −> onResume() in activity life cycle.
Q 21 - Can a class be immutable in android?
B - Yes, Class can be immutable
Answer : B
Class can be immutable.
Q 22 - What is a thread in android?
Answer : D
The concurrent executable unit is called a thread. It's performs some background functionalities with services.
Q 23 - What are the main components in android?
Answer : A,B,C and D
The main components in android are Activity, services, Broadcast Receiver and content providers.
Q 24 - What is bean class in android?
A - A class used to hold states and objects
B - A bean class can be passed from one activity to another.
Answer : A
Bean class can hold other states and objects. It contains all fields which are private with setter and getter.
Q 25 - What is off-line synchronization in android?
A - Synchronization with internet
B - Background synchronization
Answer : C
Synchronization without internet in which we can take the application data without internet.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | B |
2 | D |
3 | A |
4 | C |
5 | A |
6 | A |
7 | C |
8 | B |
9 | A |
10 | B |
11 | D |
12 | B |
13 | D |
14 | A |
15 | C |
16 | D |
17 | D |
18 | A |
19 | B |
20 | C |
21 | B |
22 | D |
23 | A |
24 | B |
25 | C |