Android Basic Interview Questions
Categories: Development Software Android Apps
Ques 1. What is Android Debug Bridge(ADB)? Ans. Android Debug Bridge is a command-line tool used to allow and control communication with an emulator instance. It gives the power for developers to execute remote shell commands to run applications on an emulator. Ques 2. What is DDMS? Ans. DDMS(Dalvik Debug Monitor Server) is a debugging tool in the Android platform. It gives the following list of debugging features: Port forwarding services. Thread and heap information. Logcat. Screen capture on the device. Network traffic tracking. Ques 3. What is AIDL? Which data types are supported by AIDL? Ans. AIDL(Android Interface Definition Language) is a tool that handles the interface requirements between a client and a service for interprocess communication(IPC) to communicate at the same level. The process involves dividing an object into primitives that are understood by the Android operating system. Data Types supported by AIDL is as follows: String List Map CharSequence Java data types (int, long, char, and boolean) Ques 4. What is a Toast? Ans. Toast is a message that pops up on the screen. It is used to display the message regarding the status of the operation initiated by the user and covers only the expanse of space required for the message while the user’s recent activity remains visible and interactive. Ques 5. What is context? Ans. The context in Android is the context of the current state of the application or object. The context comes with services like giving access to databases and preferences, resolving resources, and more. Ques 6. What is ANR in Android? Ans. ANR(Application is Not Responding) is a dialog box that appears when the application is not responding. This ANR dialogue is displayed whenever the main thread within an application has been unresponsive for a long time under the following conditions: a. When there is no response to an input event even after 5 seconds. b. When a broadcast receiver has not completed its execution within 10 seconds. Ques 7. What are containers? Ans. Containers carry objects and widgets together, based on which specific items are required and in what particular arrangement is needed. Containers may hold labels, buttons, fields, or even child containers, etc. For example, if you want a form with fields on the left and labels on the right, you will need a container. If you want the OK and Cancel buttons to be below the rest of the form, next to one another, and flush to the right side of the screen, you will need a container. If you have several widgets, you will need a container to have a root element to place the widgets inside. Ques 8. What is the role of Dalvik in Android development? Ans. Dalvik serves as a virtual machine, and it is responsible for running every Android application. Because of Dalvik, a device will have the ability to execute multiple instances of virtual machines efficiently through better memory management Ques 9. Mention the difference between class, file and activity in Android? Ans. The difference between them is as follows: a. Class is a compiled form of a .java file that Android uses to produce an executable .apk file. b. A file is a block of arbitrary information or resources used for storing information. It can be of any file type. c. Activity is a single screen that represents GUI(Graphical User Interface) with which users can interact in order to do something like dial the phone, view email, etc. Ques 10. What is an intent? Ans. An intent is a messaging object that is used to request an action from other components of an application. It can also be used to launch an activity, send SMS, send an email, display a web page, etc. Ques 11. What are broadcast receivers? How is it implemented? Ans. A broadcast receiver is a mechanism used for listening to system-level events like listening for incoming calls, SMS, etc. by the host application. It is implemented as a subclass of Broadcast Receiver class and each message is broadcasted as an intent object.