Android Interview most ask Questions and Answers 2021



1) What is Android?

Android is an open-source, Linux-based operating system major used in mobiles, tablets, televisions, smart watch and etc. Andy Rubin is a android founder.

2) What are the advantages of Android?

Open-source: It means no license, distribution and development fee.

Platform-independent: It supports Windows, Mac, and Linux platforms.

Supports various technologies: It supports camera, Bluetooth, wifi, speech, EDGE etc. technologies.

3) Does android support other languages than java?

Yes, an android app can be developed in C/C++ also using android NDK (Native Development Kit). It makes the performance faster. It should be used with Android SDK.

4) What is AAPT?

AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.

5) What is activity in Android?

Activity is like a frame or window in java that represents GUI. It represents one screen of android.

6) What are the life cycle methods of android activity?

There are 7 life-cycle methods of activity. They are as follows:

  1. onCreate()
  2. onStart()
  3. onResume()
  4. onPause()
  5. onStop()
  6. onRestart()
  7. onDestroy()

 7) How are view elements identified in the android program?

View elements can be identified using the keyword findViewById.

8) Define Android toast.

An android toast provides feedback to the users about the operation being performed by them. It displays the message regarding the status of operation initiated by the user.

9) What is intent?

It is a kind of message or information that is passed to the components. It is used to launch an activity, display a web page, send SMS, send email, etc. There are two types of intents in android:

  1. Implicit Intent
  2. Explicit Intent

10) What items are important in every Android project?

These are the essential items that are present each time an Android project is created:

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

 11) Explain the use of 'bundle' in android?

We use bundles to pass the required data to various subfolders.

12) What is Orientation?

Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.

13) What is ANR?

ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.

14)  What is an application resource file?

The files which can be injected for the building up of a process are called as application resource file.

15) List the various storages that are provided by Android.

The various storage provided by android are:

  • Shared Preferences
  • Internal Storage
  • External Storage
  • SQLite Databases
  • Network Connection

16) When is the onStop() method invoked?

A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.

17) How are layouts placed in Android?

Layouts in Android are placed as XML files.

18) Where are layouts placed in Android?

Layouts in Android are placed in the layout folder.

19) What is the implicit intent in android?

The Implicit intent is used to invoke the system components

20) What is explicit intent in android?

An explicit intent is used to invoke the activity class.

21) How to call another activity in android?

Intent i=new Intent(getApplicationContext(), ActivityNew.class;

startActivity(i);

22) What is a content provider?

A content provider is used to share information between Android applications.

23) What is fragment?

The fragment is a part of Activity by which we can display multiple screens on one activity.

24) What is the Google Android SDK?

The Google Android SDK is a toolset which is used by developers to write apps on Android-enabled devices. It contains a graphical interface that emulates an Android-driven handheld environment and allows them to test and debug their codes.

25) What is a singleton class in Android?

A singleton class is a class which can create only an object that can be shared by all other classes.