Android interview questions

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

Download Android interview questions PDF

Android interview questions

These are the following exceptions in Android:

  • Inflate exception
  • Surface.out of resource exception
  • Surface holder bad surface type exception
  • Window manager took exception.

Permission allows certain restrictions to be imposed primarily to protect data and code. Without this, codes could be compromised, resulting in defects in the actual function.

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.

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

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.

The Google Android SDK is a set of tools that are used by the developers to write the app on Android-enabled devices. It contains a graphical interface that emulates an Android-driven handheld environment and allows the developers to debug their codes as per the requirements.

Intents help to display the notification message to the user from within the Android device. Users are made to response this alert.

Following are the code names with year:

  1. Astro
  2. Blender
  3. Cupcake (April 2009)
  4. Doughnut (September 2009)
  5. Eclair (October 2009)
  6. Froyo (may 2010)
  7. Gingerbread (December 2010)
  8. Honeycomb (February 2011)
  9. Ice Cream Sandwich (October 2011)
  10. Jellybean (July 2012)
  11. Kitkat (October 2013)
  12. Lollipop (November 2014)
  13. Marshmallow (since October 2015)

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.

XML based layouts provide a consistent and standard means of setting GUI format. In general use, layout details are placed in XML files, and all other items are generally placed in a source files.

Advantages of Android are as follows:

  • It is an Open source that requires no licensing
  • It is Platform independent that supports Windows, Mac, and Linux platforms.
  • Supports different technologies like camera, Bluetooth, wifi, speech, EDGE, etc.
  • It is a highly optimized virtual machine.

Activities are windows to an interface. Like a window is created with the aim to display the output and to know about input in the form of a dialogue box. In the same manner, activities play its role, may not always in the form of a user interface.

Dialogue box supported by Android are:

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

There are seven lifecycle methods of Android activities. They are:

  • On create()
  • On start()
  • On resume()
  • On pause()
  • On stop()
  • On restart()
  • On destroy()

Orientation is set using set orientation (), dictates whether the linear layout is represented as a row or else as a column. There the values are set as HORIZONTAL or VERTICAL.