Android Interview Questions And Answers
Download Android Interview Questions and Answers PDF
Optimize your Android interview preparation with our curated set of 62 questions. Our questions cover a wide range of topics in Android to ensure you're well-prepared. Whether you're new to the field or have years of experience, these questions are designed to help you succeed. Download the free PDF to have all 62 questions at your fingertips. This resource is designed to boost your confidence and ensure you're interview-ready.
62 Android Questions and Answers:
Android Job Interview Questions Table of Contents:
1 :: How to avoid ANR status?
Android allows the system to protect the applications that are not responsive for a period of time by displaying a status called as ANR (Application not responding). Methods should use the main thread for work, as it takes long time for the main thread to complete the task. The work should be divided and another thread named as child thread be used for executing more tasks, as it takes less time. Main thread should provide a handler for child threads to post back upon completion.
Read More2 :: What is the file features used in android?
Android is rich in file features and it provides lots of variations in them as well. The file features are as follows:
Intent filters: includes bundle of information which describes a desired action.
Icons and Labels: includes information for small icon and a text label that can be displayed to users. These are set for an intent filter and are used to represent a component which fulfills the function advertised by the filter.
Permissions: it is a restriction or limitation access to a part of code or data on the device. It is given as:-android.permission.CALL_EMERGENCY_NUMBERS
Libraries: it includes the basic packages for building and developing applications.
Read MoreIntent filters: includes bundle of information which describes a desired action.
Icons and Labels: includes information for small icon and a text label that can be displayed to users. These are set for an intent filter and are used to represent a component which fulfills the function advertised by the filter.
Permissions: it is a restriction or limitation access to a part of code or data on the device. It is given as:-android.permission.CALL_EMERGENCY_NUMBERS
Libraries: it includes the basic packages for building and developing applications.
3 :: How does the AOSP relate to the Android Compatibility Program?
AOSP stands for Android Open-source project that maintains Android software and keep track of the new versions. It can be used for any purpose including the devices that are not compatible with other devices. It is related to the Android Compatibility Program as it defines the implementation of Android that is compatible with the third party apps.
Read More4 :: What are the different Storage Methods in android?
Android provides many options for storage of persistent data. It provides the solution according to your need. The storages which have been provided in Android are as follows:-
Shared Preferences: Store private primitive data in key-value pairs
Internal Storage: Store private data on the device memory.
External Storage: Store public data on the shared external storage.
SQLite Databases: Store structured data in a private database.
Network Connection: Store data on the web with your own network server.
Read MoreShared Preferences: Store private primitive data in key-value pairs
Internal Storage: Store private data on the device memory.
External Storage: Store public data on the shared external storage.
SQLite Databases: Store structured data in a private database.
Network Connection: Store data on the web with your own network server.
5 :: What is localization and how to achieve?
Localization is a way of representing the products in different languages. Android is an operating system which runs in many regions, so to reach different users localization is a must. Localization in Android can be achieved by incorporating different languages in the application which you are using. To do this knowledge of Java, XML elements, Activity lifecycle and general principles of internationalization and localization are required.
Read More6 :: Explain Briefly the Android Application Architecture?
Android application architecture allows the simplification and reuse of any application. It provides a better way to publish the capabilities of the application so that any other application can make good use of those capabilities. This architecture includes the following components:
Intent: perform some operation on some activity and service
Resource Externalization - such as strings and graphics
Notification signaling users - light, sound, icon etc.
Content Providers – sharing of data between various applications
Read MoreIntent: perform some operation on some activity and service
Resource Externalization - such as strings and graphics
Notification signaling users - light, sound, icon etc.
Content Providers – sharing of data between various applications
7 :: What dialog boxes are supported in android?
There are 4 dialog boxes which have been supported by Android. These are as follows:
AlertDialog: it supports 0 to 3 buttons with a list of selectable elements that includes check boxes and radio buttons.
-ProgressDialog: it displays the progress of any dialog or application. It is an extension of AlertDialog and supports adding buttons.
-DatePickerDialog: it is used to give provision to the user to select the date
- TimePickerDialog: it is used to give provision to the user to select the time
Read MoreAlertDialog: it supports 0 to 3 buttons with a list of selectable elements that includes check boxes and radio buttons.
-ProgressDialog: it displays the progress of any dialog or application. It is an extension of AlertDialog and supports adding buttons.
-DatePickerDialog: it is used to give provision to the user to select the date
- TimePickerDialog: it is used to give provision to the user to select the time
8 :: What is APK format in Android? How to make an APK file?
APK termed as Application package file is a format that is used to distribute and install the application software for android, and middleware on the android operating system. To make an APK file, first android is compiled and then all of its parts are grouped in one file termed as package. The package consists of the entire program’s code (.dex files), resources, manifest file etc. The file is saved with .apk extension.
Read More9 :: What is a Sticky Intent?
Intent is basically an abstract description of an operation that has to be performed for communication. Sticky Intent is also a type of intent which allows the communication between a function and a service. For example: sendStickyBroadcast() performs send Broadcast(Intent) which stays even after the broadcast is complete. It helps in retrieving the data quickly. The message ACTION_BATTERY_CHANGED of an operating system is an example of it.
Read More10 :: How to Translate in Android?
Android uses Google translator to translate data from one language into another language using XAMPP. XAMPP is used to transmit the data. The steps which have to be followed are: Type the message in your language, go to the language setting, a list will be displayed there, select the language from the list to convert your text.
Read More11 :: Describe Android Application Architecture?
Android Application Architecture has the following components:
Services – like Network Operation
Intent - To perform inter-communication between activities or services
Resource Externalization - such as strings and graphics
Notification signaling users - light, sound, icon, notification, dialog etc.
Content Providers - They share data between applications
Read MoreServices – like Network Operation
Intent - To perform inter-communication between activities or services
Resource Externalization - such as strings and graphics
Notification signaling users - light, sound, icon, notification, dialog etc.
Content Providers - They share data between applications
12 :: Describe a real time scenario where android can be used?
Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write. However, you have mobile phone with you.
With a mobile phone with android, the Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.
Read MoreWith a mobile phone with android, the Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.
13 :: Why to use Android?
Android is useful because:
It is simple and powerful SDK
Licensing, Distribution or Development fee is not required
Easy to Import third party Java library
Supporting platforms are – Linux, Mac Os, Windows
Read MoreIt is simple and powerful SDK
Licensing, Distribution or Development fee is not required
Easy to Import third party Java library
Supporting platforms are – Linux, Mac Os, Windows
14 :: What are the dialog boxes that are supported in android? Explain?
Android supports 4 dialog boxes:
AlertDialog : An alert dialog box supports 0 to 3 buttons and a list of selectable elements, including check boxes and radio buttons. Among the other dialog boxes, the most suggested dialog box is the alert dialog box.
ProgressDialog: This dialog box displays a progress wheel or a progress bar. It is an extension of AlertDialog and supports adding buttons.
DatePickerDialog: This dialog box is used for selecting a date by the user.
TimePickerDialog: This dialog box is used for selecting time by the user.
Read MoreAlertDialog : An alert dialog box supports 0 to 3 buttons and a list of selectable elements, including check boxes and radio buttons. Among the other dialog boxes, the most suggested dialog box is the alert dialog box.
ProgressDialog: This dialog box displays a progress wheel or a progress bar. It is an extension of AlertDialog and supports adding buttons.
DatePickerDialog: This dialog box is used for selecting a date by the user.
TimePickerDialog: This dialog box is used for selecting time by the user.
15 :: What are the advantages of Android?
The following are the advantages of Android:
The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like AT&T and Orange will be broken by Google Android.
Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized
Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android.
Read MoreThe customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like AT&T and Orange will be broken by Google Android.
Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized
Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android.
16 :: Explain about the exceptions of Android?
The following are the exceptions that are supported by Android
InflateException : When an error conditions are occurred, this exception is thrown
Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown
SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.
Read MoreInflateException : When an error conditions are occurred, this exception is thrown
Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown
SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.
17 :: How to select more than one option from list in android xml file? Give an example?
Specify android id, layout height and width as depicted in the following example.
<ListView android:id="@+id/ListView01" android:layout_height="wrap_content" android:layout_width="fill_parent"></ListView>
Read More<ListView android:id="@+id/ListView01" android:layout_height="wrap_content" android:layout_width="fill_parent"></ListView>
18 :: What is android?
Android is a stack of software for mobile devices which has Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java language’s byte code which later transforms into .dex format files.
Read More19 :: What are the features of Android?
Components can be reused and replaced by the application framework.
Optimized DVM for mobile devices
SQLite enables to store the data in a structured manner.
Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies
The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for Eclipse IDE.
Read MoreOptimized DVM for mobile devices
SQLite enables to store the data in a structured manner.
Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies
The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for Eclipse IDE.
20 :: What is needed to make a multiple choice list with a custom view for each row?
Multiple choice list can be viewed by making the CheckBox android:id value be “@android:id /text1". That is the ID used by Android for the CheckedTextView in simple_list_item_multiple_choice.
Read More21 :: Explain What are the differences between a domain and a workgroup?
In a domain, one or more computer can be a server to manage the network. On the other hand in a workgroup all computers are peers having no control on each other. In a domain, user doesn’t need an account to logon on a specific computer if an account is available on the domain. In a work group user needs to have an account for every computer.
In a domain, Computers can be on different local networks. In a work group all computers needs to be a part of the same local network.
Read MoreIn a domain, Computers can be on different local networks. In a work group all computers needs to be a part of the same local network.
22 :: What is the TTL (Time to Live) and why is it required?
TTL is a value in data packet of Internet Protocol. It communicates to the network router whether or not the packet should be in the network for too long or discarded. Usually, data packets might not be transmitted to their intended destination within a stipulated period of time. The TTL value is set by a system default value which is an 8-bit binary digit field in the header of the packet. The purpose of TTL is, it would specify certain time limit in seconds, for transmitting the packet header. When the time is exhausted, the packet would be discarded. Each router receives the subtracts count, when the packet is discarded, and when it becomes zero, the router detects the discarded packets and sends a message, Internet Control Message Protocol message back to the originating host.
Read More23 :: List the components of Android?
The main components of Android are:
1) Activity
2) Intent
3) Service
4) Broadcast receiver
5) Content Provider
Read More1) Activity
2) Intent
3) Service
4) Broadcast receiver
5) Content Provider
24 :: Define the Content provider component of Android?
Content provider is a data store that enables data sharing across different applications. Content providers provide a uniform interface to access the data. An example is Call logs.
Read More25 :: Define the Services component of Android?
Services are components that do not have a User Interface; they run in the background. An example of Service component in Facebook app would be the friend request notifications. They would continue to run, even if you switch to another activity or application.
Read More