Android interview questions

Android interview questions Download Android interview questions PDF

Android interview questions

Serializable is a standard Java interface. It is not a part of the Android SDK. Its simplicity is its biggest beauty. Just by implementing this interface the POJO will be ready to jump from one particular activity to another. There is another interface known as parseable. It is a part of the Android SDK. Paracelable was specifically designed in a way that there is no reflection left while using.

The architecture of Android application has few components, which have their functions to perform:

  • Service: It performs the background functions
  • Intent: Performs the interconnection function between activities and data passing mechanism
  • Resource: Externalization it is used to perform strings and graphics functions
  • Notification: This shows the lights, sound, icon, notification, incoming chats messages dialogue box, etc.
  • Content providers: It shares the data between applications.

The emulator lets the developers “play” all around the interface that gives the experience of an actual mobile device. It is for writing and testing codes, and debug too. Emulators are safe for testing codes especially if the user is in the early stage of design.

Activities can be closed or can be terminated easily as and when the user wants to. Services are designed to run on the background or behind the scenes and can act independently. Most of the services run on a continuous basis regardless of their certain or no certain activities been executed.

AAPT is Android Asset packing tool. This provides developers with the ability to deal with zip-compatible archives, and it includes creating, extracting as well as viewing its content.

Tools used to develop an Android app are as follows:

  • JDK
  • Eclipse +ADT Plugin
  • SDK Tools

Dalvik plays an important role in the development of Android. It acts as a virtual machine where the Android application runs. It is with the help of Dalvik only that devices can execute multiple virtual machines effectively along with better memory management.

The supporting facility of Android new version depends on the capabilities and specs of the phone. There are few Android power phones that allow the user to update their version to the higher operating version. Few don’t allow getting the updated version work. Either the new feature will not be supported, or the performance of the operating device will slow down.

A fragment means behavior or the portion of user interface in a Fragment Activity. One can combine multiple fragments in a single activity to build a UI and can reuse the fragment in multiple activities. The fragment can be considered as a modular section of an activity. This has its life cycle, gets its input events, which can be added or removed accordingly. It is must host a fragment in an activity and fragments lifecycle is directly related by the host activity’s lifecycle.

AIDL is Android Interface Definition Language. This IDL allows the user to define the programming interface; both the clients and service agree upon to communicate with each other using inter-process communication (IPC). On Android platform, it becomes difficult for one processor to access the memory of another process. They need to decompose their objects into primitive that the operating system can manage, and marshal the objects across. The code to perform that marshaling is tedious to write therefore Android handles this for the users with the help of AIDL

Follow the below steps to create a bounded service through AIDL

  • Step 1. Create the .aidl file that defines the programming interface.
  • Step 2. Implement the interface, by extending the inner abstract stub class and imparting its methods.
  • Step 3. Expose the interface by implementing the service to the users.

DDMS is Dalvik Debug Monitor Server.This gives a wide array of debugging features of which are

  • Port forwarding services
  • Screen capture
  • Thread and heap information
  • Network traffic tracking
  • Location data
  • spoofing

Android is an open-sourced operating system by Linux that is primarily used in mobile devices like cell phones and tablets. This Linux kernel based system is equipped with high and advanced components that allow developers to create and run apps. Therefore performs the basic as well as the advanced functions.

Services here is an application component that can perform long-duration operations in the background. It doesn’t provide a user interface. Other application components can start a service and can continue to perform/ run in the background when the users switch to some other application. There are three different types of services:

  • Foreground: The activity of performing the operation in foreground service is noticeable to the users. A notification is displayed for the same.
  • Background: Generally, a background service performs its operations, which is directed not noticed by the users on their screen. Example if an app uses service to compact its storage this will be considered as background service.
  • Bound: A service is bound when an application component binds to it by calling it as bind service. A bound service runs only as long as another application component is bound to it.