Top 20 Android Interview questions you must prepare for Android
Android Application developers are in great demand in this modern era, and it is also one of the highest-paying career. As a result, many tech-savvy individuals are attempting to get into this field.
Many multinational corporations (MNCs) and small businesses offer tough interview questions.
This article contains a list of Android interview questions and answers that will be useful to both freshers and experienced professionals who seeking for Android career.
1. Latest version of Android
Android 11- September 8, 2020 — API Level — 30
2. What are the different stages of the Activity life cycle in Android?
3. What are the types of intents in Android?
Two types of intent in Android .
- Implicit Intent Implicit intent does not specify any components. It is used to invoke an actions.
- Explicit Intent Explicit intents used to start an activity, send data between two activities.
4. What is the use of AndroidManifest.xml file in Android application?
AndroidManifest.xml file includes all components in an Android application such as the activities, services, content providers, broadcast receivers.
5. What is a Toast ?
Toast is a small piece of message displayed on the screen, similar to tooltips and popup notifications. We can define a time such as LENGTH_SHORT and LENGTH_LONG to specifying the duration of toast message to be displayed on the screen.
6. Why we need to use fragments is Android?
Fragments help to create UI rich design for the app, pass data between different screens, and we can split a single screen into multiple subdivisions to improve our app performance.
7. Why WebView?
WebView in Android used to display web page in the application. This can be done by using the loadUrl() and loadData() methods. The WebView can only display the online content to the particular Android activity.
8. What are the components in an Android project explorer?
The Android Studio project explorer contains all files needed to make up the project. There are two sub folders in the project explorer.
- app — The app folder again have three sub folders such as manifest, java, res.
- Gradle Scripts — The dependency file such as the java libraries, other plugins.
9. What are activities?
Activities in Android application are the screens that displayed on a device. An app can contain more than one activity, meaning one or more screens.
10. What is mean by screen orientation in Android?
Screen orientation is a property of activity to define the change from one state to another. There are various type of screen orientations they are portrait, landscape, sensor, unspecified etc.
11. Difference between activities and services?
Activities in Android application are the screens that displayed on a device. A Service in Android used to perform long-running operations in the background.
12. Use of bundle in Android?
Bundle in Android is used to pass data between Activities.
13. Different types of dialog boxes in Android?
There are four type of Android dialogs
- Alert Dialog.
- DatePicker Dialog.
- TimePicker Dialog.
- Custom Dialog.
14. Difference between compileSdkVersion and targetSdkVersion?
The compileSdkVersion that defines which Android SDK version will be used by Gradle to compile the application. The targetSdkVersion property specifies the Android version for which the app was built and tested.
15. apk stands for _____?
Android Application Package
16. What is an Adapter in Android?
The adapter is to act as a bridge between the adapter and its related data.
17. What is mean by Views in Android?
The UI elements in Android are called Views. Eg: EditText, Button, CheckBox, etc.
18. Difference between context menu and popup menu?
A context menu appears when user press long click on the view. A popup Menu is a list menu that appears vertically on the view.
19. Difference between getContext(), getApplicationContext(), getBaseContext()?
getContext() — Returns the context of current activity. getApplicationContext() — Used to return the context for the activities running in an application. getBaseContext() — Used to access context of one activity from another context.
20. What is a Resource File?
The res folder in Android project explorer have all type of resources such as image, video, logo icons and values for the application.
It is very important to take a training for Android to get a confidence to attend all interviews. So, you can plan to join for an android app development training in Kochi to know more in depth about the tips and tricks related to the development process. You can get the confidence to build your own app, along with the latest technologies that will help you improve your coding style. We are one of the android training center in Kochi, and we would be delighted to assist you in improving your Android career.