Android interview questions

In the year 2008 Android came as a popular computing platform, which is based on the Linux operating system. In the smartphone market, it became one of the most leading names that managed to change the whole. In the last ten years time, it grabs the majority of market share sharing with iOS and has effectively become the world most popular operating system. With the maturity of Android, it is finding its new way into a variety of devices, not just on smartphones but also includes televisions, projectors, automobiles and even now the vehicles.

Today with the advent of the Android platform, the Android developers are huge in demand and every sector and industry is looking to recruit them in-house. If you aspire to be an Android developer, then this is just the place for you. Given below is the list of questions, which answers both basic and advanced concepts of Android. These questions if well prepared before an interview shall give an extra edge to the candidate and give confidence of facing the panel:

Below is the list of 40+ Android Interview Questions with answers

#1 State the importance of default resources.

Default resources contain the default string and files. If this resource is not present the error will keep occurring, and the app will not be able to run. Resources are placed in subdirectories under the project res/ directory. Moreover, therefore helps the app to function in the desired conditions.

#2 List few items, which you think may be important in every Android project?

The important items for Android projects are:

  • AndroidManifest.xml
  • Build.xml
  • Bin/
  • Src/
  • Res/assets/

#3 What are the Android application components?

Android application components are the building block essentially used in the Android application. The application manifest file named Android manifest.xml couples the components. This describes each component of the application and describes how they interact, and then the processing activity takes place.

There are four main components, which are:

  • Activities: They show the UI and handle the interaction of the users in smartphone screen.
  • Services: They take care of the processing associated with the application.
  • Broadcast Receivers: They handle the communication process between Android OS and application.
  • Content Providers: They handle issues with data and database management.

#4 What are the other languages that Android supports other than JAVA?

Android supports C++, C. The app can be developed in C or C++ using Android NDK (Native development kit). This makes system works faster.

#5 what dialogue boxes are supported by the Android box?

Dialogue box supported by Android are:

  • Alert dialogue
  • Process dialogue
  • Data picker dialogue
  • Time picker dialogue

#6 What role has Dalvik played in Android development?

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.

#7 What is Android?

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.

#8 What does Fragment mean?

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.

#9 What is sticky intent?

It is broadcast from sendstickybroadcasr() method. This allows the intent to float even after the broadcast and allowing others to collect data from.

#10 Give a brief idea about Android application architecture?

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.

#11 Explain sticky intent?

Sticky intent sticks with the Android for future broadcast listeners. For instance, if Battery low event occurs then that intent will be stick with Android, so that if any future user requested for Battery – Low, it will be fired.

#12 What is a marshmallow in Android?

In the latest update of Android version 6.0, the official Android code name is known as a marshmallow. It was launched in May 2015. This was the successor of the Android version 5.0 named as Lollipop. Google named this version as a marshmallow on 17th August 2015 for Nexus devices.

#13 What are launch modes?

It is an instruction for Android OS that specifies how the activity should be launched or performed. The activities are performed into two areas, which are:

  • Tasks: It’s a collection of activities, with which the users interact when they perform certain jobs. An application contains a number of activities.
  • Back Stack: Back stack in a back stack the activities are arranged with the order in which each is opened. This maintained stack called back stack.

#14 What are services in Android and what is its type?

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.

#15 What is DDMS?

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
Ask a Question