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.
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
Using FragmentManager.findFragmentByID(R.id.fragment), we can find the fragment/fragments which are placed on the layout
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?
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?
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?
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?
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?
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?
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?
Without UI, we can call an activity, It will do some background functionalities.
Q 11 -What are return types of startActivityForResult() in android?
strartActivityforResult() returns RESULT_OK and RESULT_CANCEL.
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?
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?
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?
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?
Give same id for both notifications.
Q 17 - What is the main difference between set and list in android?
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?
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?
Anchor View provides the information on respective relative positions of views.
Q 20 - What is the life cycle of foreground activity in android?
Foreground activity should be onCreate() −> onStart() −> onResume() in activity life cycle.
Q 21 - Can a class be immutable in android?
Class can be immutable.
Q 22 - What is a thread in android?
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?
The main components in android are Activity, services, Broadcast Receiver and content providers.
Q 24 - What is bean class in android?
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?
Synchronization without internet in which we can take the application data without internet.
|Question Number||Answer Key|