Android Technical Interview Questions

What is Android?

Android is a type of operating system (OS). It is developed on the basis of Linux. It is primarily run on mobile or cellular phones. However, it has now expanded for use on tablets and even computers and other devices.

Android was originally developed by Android, Inc., which was bought by Google in 2005. Since, then Google has taken over the development and distribution of the OS. Additionally, Google also founded the Open Handset Alliance – a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices.

Currently, Android is open source, and anyone can use it to mod or to develop programs and application on it. However, most devices that come with Android tend to have proprietary components added to it. This also allows them to stand apart from their competitors that also use Android.

Who is the founder of Android?

Android is the most prominent operating system (OS) for mobile phones, tablets, and other similar devices. It is the most popular and the highest selling OS on the market. So how did it come to be?

Android was originally developed by Android Inc., which is based out of Palo Alto, California in October 2003. The company and the OS was founded by Andy Rubin with Rich Miner, Nick Sears, and Chris White. Their aim was to develop "smarter mobile devices that are more aware of its owner's [sic] location and preferences".

The company and the OS were then acquired by Google in July 2005. Since then, Google has developed Android into the platform that it is today.

Describe the Android Application Architecture

The Application Architecture of Android has the following components:

  • Services: These are used to perform background functionalities.
  • Intent: This is used to perform the inter connection between activities and the data passing mechanism
  • Resource Externalization: This deals with the strings and graphics
  • Notification: This deals with the  light, sound, icon, notification, dialog box and toast
  • Content Providers: This is used to share the data between applications
List the code names of Android

Since its launch, Android, like any other software has seen a variety of versions. However, what’s different is that Android has named its version after sugary delights, such as:

Code name

Versions

Aestro (unofficial)

1

Blender (unofficial)

1.1

Cupcake

1.5

Donut

1.6

Eclair

2.0 – 2.1

Froyo

2.2 – 2.2.3

Gingerbread

2.3 – 2.3.7

Honeycomb

3.0 – 3.2.6

Ice Cream Sandwich

4.0 – 4.0.4

Jelly Bean

4.1 – 4.3.1

KitKat

4.4 – 4.4.4

Lollipop

5.0 – 5.1.1

Marshmallow

6.0 – 6.0.1

Nougat

7.0 – 7.1.1

What are the advantages of Android?

Android is the currently at the top of the market when it comes to a mobile operating system. The reason behind this is that Android features certain benefits over other operating systems. These include the following:

  • Open-source: Android is open source, this means that it does not require licence, distribution and development fee.
  • Platform-independent: Android is platform-independent, which means that it supports Windows, Mac and Linux platforms.
  • Supports various technologies: Android supports many various technologies, including but not limited to camera, bluetooth, wi-fi, speech, EDGE, etc.
  • Highly optimized Virtual Machine: Android uses highly optimized virtual machine for mobile devices, called DVM (Dalvik Virtual Machine).
What language does Android support to develop an application?

There are a number of languages that can be used to develop third party applications for Android. However, when it was originally launched Android only officially supported Java for building distributable third-party Android software.

Now, one can also use Android Native Development Kit (Android NDK), which allows developers to build Android software components with C and C++ programming languages. Google has also extended Android to support popular dynamic scripting languages such as PERL, JRuby, Python, LUA and BeanShell by using the Android Scripting Environment (ASE). Furthermore, Scala is also supported.

However, the official language for Android development is still Java, and Google recommends that developers use that only, as it will provide the most compatibility.

What is the APK format?

Android Package Kit, or the APK for short, it is package file format that is used by the Android operating system for distribution and installation of mobile apps and middleware. It is a type of container file that is used to contain the files of the mobile apps in order for easier download and transfer.

An APK file contains all of that program's code (such as .dex files), resources, assets, certificates, and manifest file. The file format typically has a Filename extension ending in .apk, or sometimes in .xapk. The APK is extended from the zip format packages based on the JAR file format.

What is An Activity in Android?

Android activity is the subclass of ContextThemeWrapper class. It is a single screen with a user interface, similar to a window or frame of Java.

 It is the screen that the user sees, where the information is presented. It is also the starting place where any activity can be launched. It also allows the developer to place all of the UI components or widgets in a single screen.

An activity class loads all the UI components using the XML file available in res/layout folder of the project. An application can have one or more activities without any restrictions. One can easily switch between the activities during runtime of the application. However, every activity for that application should be declared in the AndroidManifest.xml file and the main activity for the application must be declared in the manifest with an <intent-filter> that includes the MAIN action and LAUNCHER category.

What is the Android Activity Lifecycle?

Android Activity Lifecycle is controlled by 7 methods of android.app.Activity class, which in turn is the he subclass of ContextThemeWrapper class.

Here are the 7 lifecycle methods of android activity:

  • onCreate - called when activity is first created
  • onStart - called when activity is becoming visible to the user
  • onResume - called when activity will start interacting with the user
  • onPause - called when activity is not visible to the user
  • onStop - called when activity is no longer visible to the user
  • onRestart - called after your activity is stopped, prior to start
  • onDestroy - called before the activity is destroyed

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.