Android interview questions

Android is one of the best operating systems available for tablets, smart phones and more. Nowadays the Android's software development is really popular, so for companies; finding the proper programmer is a very important issue. Here you will find a good compilation of Android interview questions, so either you are an interviewer or a programmer, this questions will be really helpful.

Android interview questions and answers

Android interview questions

What is Android?

Very common question but also very important, Android is an operating system based on Linux, oriented to be used on smart phones, tablets, Google TV and more.

What is APK?

It is a file format, it means Android Application Package File and is used to distribute and install applications on Android.

Name and explain the dialog boxers supported on Android.

  • Alert Dialog Box: Supports from 0 to 3 buttons, including check boxes and radio buttons. It is also the most suggested dialog box.
  • Progress Dialog Box: It displays a progress bar or wheel, is an extension of the alert dialog boxes and supports buttons too.
  • Date Picker Dialog Box: The users select a date from them.
  • Time Picker Dialog Box: The users select the time from them.

Name and explain the exceptions handled by android.

  • Inflate Exception: This exception comes from an inflater on error conditions.
  • Surface.OutOfResourceException: This is thrown when a surface is not resized or created.
  • SurfaceHolder.BadSurfaceTypeException: Exception thrown from lockCanvas() when is called on a surface of the SURFACE_TYPE_PUSH_BUFFERS type.
  • WindowManager.BadTokenException: This exception is thrown out when attempting to add view whose WindowManager.LayoutParams token is invalid.

What language is supported for application development on Android?

The language used is: Java Programming Language.

Explain the differences between file, class and activity in Android.

  • File: Can be any type of file, it is a block of resources.
  • Class: Android use the .class file to produce the APK file, it is compiled from .java file.
  • Activity: It is an extended class in Android, used for loading User Interface elements on views.

Which are the android key components?

  • Libraries.
  • Linux Kernel.
  • Android Framework.
  • Android Applications.

What is the difference between activities and Services?

The biggest difference is that activities can be closed or terminated by users at anytime they want, and services run behind the scene, most of them run continuously.

Name essential items on an Android project.

  • AndroidManifest.xml
  • build.xml
  • bin/
  • src/
  • res/
  • assets/

What are containers?

Containers are, as their name say, holders of objects and widgets, they can hold among other elements, fields, labels or small containers.

What are the essential states of an activity?

  • Active: When an activity is at the foreground.
  • Paused: When an activity is at the background but still visible.
  • Stopped: When an activity is not visible, but hidden or obscured by another one.
  • Destroyed: When an activity is terminated or killed.

Why is it important to set permissions during app's development?

It is very important to protect the code and the data.

When monitoring an activity, which are the three keyloops?

  • Entire Lifetime: The activity that happens between onCreate and onDestroy.
  • Visible Lifetime: The activity that happens between onStart and onStop.
  • Foreground Lifetime: The activity that happens between onResume and onPause.

Name the four different states wherein processes are based

  • Foreground activity.
  • Visible activity.
  • Background activity.
  • Empty process.

Name the supported data types by AIDL.

  • String.
  • CharSequence.
  • List.
  • Map.
  • Native Java data types, int, long, Boolean, char and more.

To measure the knowledge of an android programmer, besides the programming skills, you can also see if he really knows how android works, so you can ask questions that involves the use of Android's smart phones or tablets, this way you can see if he/she is familiarized with the android products besides creating apps, here you have some examples of this type of android interview questions:

How do you download and install an Android application from the web?

The easiest way to do this is by using the Play Store (former Android Market), there you can search the application you want, check the reviews, the price (in case it is not free) and if it fits your requirements you can download it, once downloaded it installs automatically and that is all, ready to use.

How can you change the language of the device?

You have to go to "configuration", then choose "locale and text" and finally choose "select language".

How can you find out how much memory left you have?

You can do this by choosing the "task manager", then click on "summary". You can also choose "configuration" and "SD card and phone storage".