Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the latest version of Android? List all the versions of Android.

Answer»

The latest version is Android 11.0 released in September 2020. Most of the Android version has been named after either sweet or desserts. The following table represents the different versions, Android name, API level, and the year of release. Here API level is the integer value that identifies the API framework revision given by the version of the android platform.

VersionAndroid NameAPI LevelYear of Release
Android 1.0No Codename12008
1.1No Codename22009
1.5Cupcake32009
1.6Donut42009
2.0 - 2.1Eclair5 - 72009
2.2 – 2.2.3Froyo82010
2.3 – 2.3.7Gingerbread9 - 102010
3.0 – 3.2.6Honeycomb11 - 132011
4.0 – 4.0.4Ice Cream Sandwich14 - 152011
4.1 – 4.3.1Jelly Bean16 - 182012
4.4 – 4.4.4Kitkat19 - 202013
5.0 – 5.1.1Lollipop21 - 222014
6.0 – 6.0.1Marshmallow232015
7.0 – 7.1.2Nougat24 - 252016
8.0 – 8.1Oreo26 - 272017
9.0Pie282018
10.0Android 10292019
11.0Android 11302020

Android 1.0 (API 1): There were NUMEROUS loopholes in this Android version including the necessity of physical keyboards or hardware buttons. Important features are:

  • Browser, Google maps, and calendar.
  • Camera and scroll down the notification bar.
  • Wireless supports Wi-Fi and BlueTooth.
  • Contacts, Gmail integration, and Google synchronization.

Android 1.1 (API 2): This version was released with API changes and resolved issues found in 1.0. Important features of this version are:

  • Display details as well as reviews for locations.
  • Gives DETAILED information by clicking on the business.
  • Add save an attachment in the message.

Android 1.5 Cupcake (API 3): It brought the third-party app widgets that were the most distinguishing and valuable feature. Important features of this version are:

  • Video recordings, copy and paste facility.
  • Supports MPEG4 and 3GP formats.
  • Search function and on-screen keyboard.
  • Uploading images and videos.

Android 1.6 Donut (API 4): It had valuable changes including the ability to operate on various screen resolutions and SIZES. Donut provides the text and voice entry search including bookmark history and capacity to select multiple images for deletion. Important features of this version are:

  • Camera quick toggling features and gallery.
  • WVGA screen resolution speed.
  • Power CONTROL widget for handling Wi-Fi, GPS, BlueTooth, etc.
  • Technology support for CDMA/EVDO, VPNs, 802.1x, and a text-to-speech engine.
  • Searching applications and speed improvements for cameras.
  • Supports quick search Box.

Android 2.0-2.1 Eclair (API 5-API 7): It was released with multiple email account synchronizations and contacts. Many new features were added including flash support, color effect, scene mode, white balance, macro focus, and digital zoom. Android 2.1 version brought bug fixes and stability improvements. The most valuable feature introduced was real-time traffic information and voice-guided turn by turn navigation. Important features are:

  • Updated UI.
  • Minor API changes.
  • Support Bluetooth 2.1.
  • Improved Google map.
  • Supports live and animated Wallpapers.
  • Has the ability to add contact’s photo and select to call, message or email.

Android 2.2-2.2.3 Froyo (API 8): It was released with memory, speed, and performance improvements. It was introduced with the enhanced Bluetooth functionality and also compatibility with docks, portable Wi-Fi hotspot for 3G CONNECTION sharing. Features are:

  • Upload file support in the browser.
  • Supports alphanumeric and numeric passwords to enhance security.
  • Support for animated GIF and multiple keyboard languages.
  • Increased compatibility with headsets and car kits.

Android 2.3-2.3.7 Gingerbread (API 9-API 10): The main enhanced feature was the introduction of gaming API with improved graphical intense gaming. Features are:

  • Updated UI.
  • Support for VP8 and WebM video format.
  • Improvement in copy and paste facility.
  • Easier use of keyboard with faster and intuitive typing.
  • Supports video calling and social networking.

Android 3.0-3.2.6 Honeycomb (API 11-API 13): It was a tablet-only release to launch the Motorola Xoom. It was suitable for those mobiles having a larger view than current smartphones. Features will include:

  • Updated 3D UI and encrypted storage.
  • Gmail, camera, contacts, and gallery improvements.
  • Supports passwords with complex characters.
  • Supports multiprocessors and recent applications for easy visual multitasking.
  • Media sync from SD card.
  • Talk video chat and google eBooks.
  • Support adobe flashes in the browser.
  • More sensor support.
  • High-performance Wi-Fi connections.
  • Action bar for application control and system bar for global status and notifications
  • Chinese handwriting and redesigned keyboard.

Android 4.0-4.0.4 Ice Cream Sandwich (API 14-API 15): It is released with many enhanced features to enter the era of modern design. The snapshot was introduced to take screenshots by holding the power and volume button. Ice cream sandwich widgets are more robust and resizable compared to all older versions. Supported features are:

  • Unlocking with face-fixing.
  • Card-like appearance for app-switching.
  • Better camera performance and improved video recording with high resolution.
  • Spelling check feature, Wi-Fi direct.
  • On-screen buttons and better camera performance.
  • Ability to open up to 16 tabs in the web browser.

Android 4.1-4.3.1 Jelly Bean (API 16-API 18): It is released with Google digital assistant technology accessible from the home screen. The spectacular predictive intelligence utility gives expandable and interactive notifications. Users can enjoy multi-user support(Only for tablets). Supported features are:

  • Power control, support USB audio.
  • The improved camera app, security improvements.
  • Voice search and typing, panorama.
  • Expandable notifications, daydream as a screensaver.
  • Google displays relevant content based on search history.
  • Native emoji support, new gestures, and accessibility features
  • 4k resolution support, supporting Bluetooth with low energy.
  • Bi-directional text and different language support.
  • Set or adjust the volume of incoming calls and show a message alert as well.

Android 4.4-4.4.4 KitKat (API 19-API 20): It is released with more focus on better user experience. Supported features are:

  • GPS Support, smarter caller ID.
  • Offline music support, screen recording.
  • Contact prioritization.
  • Cartoonish ideograms and emojis to the Google keyboard.
  • UI updates for Google map navigations and alarm.
  • ‘OK, Google’ feature allows access to Google to the users without touching your smartphones.

Android 5.0-5.1.1 Lollipop (API 21-API 22): It was released with a redesigned user interface and built with “material design”. It is having many amazing features including support for better notification management. Supported features are:

  • Support ART, better and improved UI.
  • Better device protection, built-in battery saver feature.
  • Notification can be flicked away from the lock screen.
  • The revamped navigation bar supports multiple SIM cards.
  • The high definition of a voice call.

Android 6.0-6.0.1 Marshmallow (API 23): Google used “Macadamia Nut Cookie” to describe Android version 6.0 before the official announcement of Marshmallow. Supported features are:

  • Support for fingerprint readers, type-C USB support.
  • Multi-window experience, clear permission system.
  • ’Sleep Mode’ for saving the life of the battery.
  • Custom Google tabs and improved copy-pasting.

Android 7.0-7.1.2 Nougat (API 24-API 25): It was released with a native split-screen mode, data saver functionality, and a “bundled-by-app” system to organize notifications. Supported features are:

  • Multitasking and split-screen mode.
  • Storage manager enhancements, quick setting toggles.
  • Display touch enhancements, better setting application.
  • Inline reply to message and notification without opening an application.

Android 8.0-8.1 Oreo (API 26-API 27): It is having notification snoozing options, native picture-in-picture mode, and better control over how applications can alert you by notifications. Supported features are:

  • Password autofill, auto-enable Wi-Fi.
  • Downloadable fonts, multi-display support.
  • Support picture-in-picture.
  • Adaptive icons and smart text selection.
  • Notification channels and snooze notifications.
  • Google play support and new emoji styling.

Android 9.0 Pie (API 28): It is having plenty of amazing features according to the user interests and requirements. Supported features are:

  • HDR, HD audio, multiple Bluetooth connections.
  • Much more information about notification and easier text selection.
  • Sound amplifier with select to speak option.
  • Artificial Intelligence(AI) compatibility.
  • Adaptive battery and brightness with the background restrictions.
  • Supports for multi-camera with external camera compatibility.
  • New shortcut key for screenshot and accessibility menu.
  • Improved security features for protection.
  • Android backups, privacy enhancements.
  • Easier screen rotation, edge-to-edge screens support.
  • Volume and sound enhancements, selectable dark mode.

Android 10.0 (API 29): It is released with enhanced features and functionalities with higher API levels. Supported features are:

  • Support for foldable smartphones with a flexible display.
  • Dark mode for the comfortability of eyes.
  • Navigation control over gesture quicker and intuitive ever.
  • Smart reply suggestions for all messaging applications.
  • Live caption for media playing on a smartphone device.
  • Undo removal of the app.
  • Better notification control with many options.
  • Sound amplifier with much more clear sound.

Android 11.0 (API 30): Android developers are continuously working to provide more advanced applications as per the user requirements. Important features included are:

  • Native screen recording.
  • Auto revokes app permission.
  • Mute notifications during the video.
  • Increase in touch sensitivity.
  • Notification history.
2.

What is the role of Dalvik in Android development?

Answer»

DALVIK serves as a VIRTUAL MACHINE, and it is responsible for running every ANDROID application. Because of Dalvik, a device will have the ability to execute multiple instances of virtual machines efficiently through better memory MANAGEMENT.

3.

What are containers?

Answer»

Containers carry objects and widgets together, based on which specific items are required and in what particular arrangement is needed. Containers may hold labels, buttons, fields, or even CHILD containers, etc. For EXAMPLE, if you WANT a form with fields on the left and labels on the right, you will need a CONTAINER. If you want the OK and Cancel buttons to be below the rest of the form, next to one another, and flush to the right side of the screen, you will need a container. If you have several widgets, you will need a container to have a root element to place the widgets inside.

Android provides a collection of view classes that serve as containers for views. These container classes are called LAYOUTS, which are defined in the form of XML files that cannot be changed by our code during execution. The layout managers provided by Android SDK are LinearLayout, RelativeLayout, FrameLayout, AbsoluteLayout, GridLayout, and TableLayout.

4.

Explain different launch modes in Android.

Answer»

The different launch modes in Android are given below:

STANDARD:

  • This launch mode generates an activity’s NEW instance in the task from which it originated.
  • It is possible to create SEVERAL instances for the same activity.
  • For Example, suppose our current stack is A -> B -> C. Now, if we launch activity B again with the “standard” launch mode, then the new stack will be A -> B -> C -> B.

SingleTop:

  • This launch mode is similar to the Standard launch mode except if there exists an activity’s previous instance on the TOP of the stack, then a new instance will not be created.
  • But the intent will be sent to the activity’s existing instance.
  • For example, suppose our current stack is A -> B -> C. Now, if we launch the activity B again with “singleTop” launch mode,then the new stack will be A -> B -> C -> B.
  • Consider another example, where the current stack is A -> B -> C. Now, if we launch activity C again with the “singleTop” launch mode, then the stack will remain the same i.e., A -> B -> C. The intent will be passed to the onNewIntent() method.

SingleTask:

  • This launch mode will create a new task and push a new instance to the task as the root.
  • For example, suppose our current stack is A -> B -> C -> D. Now, if we launch activity B again with the “singleTask” launch mode, then the new stack will be A -> B. Here, a callback has been received on the old instance and C and D activities are destroyed.

SingleInstance:

  • This launch mode is similar to the SingleTask launch mode. But the system doesn’t support launching any new activities in the same task.
  • In a situation where the new activity is launched, it is launched in a separate task.
  • For example, Suppose our current stack is A -> B -> C. Now, if we launch the activity D with the “singleInstance” launch mode, then there will be two stacks:
    • A -> B -> C
    • D, If you CALL activity E, then it will be added to the first stack.
    • A -> B -> C -> E
    • D

Again if you Call the activity D, then it will call the same activity from the 2nd stack and pass the intent to onNewIntent().

5.

What are the troubleshooting techniques you can follow if an application is crashing frequently?

Answer»

If an Android application is crashing frequently, you can follow the below-given techniques:

Compatibility Check:

It is not possible to test an application for all kinds of devices and operating systems. There might be a possibility that an application is not compatible with your OS.

MEMORY Management:

  • Some APPS RUN perfectly on one mobile device but might crash on other devices. This is where processing power, memory management, and CPU SPEED are considered.
  • As there is a limited amount of memory space on mobile devices, you can free up memory space for the application to function properly.
  • If an application is frequently crashing, you can delete the application’s data, which will clear its cache memory and ALLOW some free space on your device and might boost the app’s performance.
6.

What is ANR in Android? What are the measures you can take to avoid ANR?

Answer»

ANR(Application is Not Responding) is a dialog box that appears when the application is not responding. This ANR dialogue is displayed whenever the MAIN thread within an application has been unresponsive for a long time under the following conditions:

  • When there is no response to an input event even after 5 seconds.
  • When a broadcast receiver has not completed its execution within 10 seconds.

Following measures can be taken to avoid ANR:

  • An application should PERFORM lengthy database or NETWORKING OPERATIONS in separate threads to avoid ANR.
  • For BACKGROUND task-intensive applications, you can lessen pressure from the UI thread by using the IntentService.
7.

Explain the difference between Implicit and Explicit Intent.

Answer»

The difference between the implicit and explicit Intents are given below:

Explicit INTENT:

An Explicit Intent is where you inform the SYSTEM about which activity should handle this intent. Here target component is defined DIRECTLY in the intent.

For EXAMPLE,

Intent i = new Intent(this, Activitytwo.class); #ActivityTwo is the target componenti.putExtra("Value1","This is ActivityTwo"); i.putExtra("Value2","This Value two for ActivityTwo"); startactivity(i);

Implicit Intent:

An Implicit Intent permits you to DECLARE the action you want to carry out. Further, the Android system will check which components are registered to handle that specific action based on intent data. Here target component is not defined in the intent.

For example,

Intent i = new Intent(ACTION_VIEW,Uri.parse("http://www.interview bit.com")); startActivity(i);
8.

What is context?

Answer»

The context in Android is the context of the current state of the application or object. The context comes with services like giving ACCESS to DATABASES and preferences, resolving resources, and more.

There are two types of context. They are:

Activity context

  • This activity context is attached to the lifecycle of an activity.
  • The activity context can be used when you are passing the context in the scope of an activity or you NEED the context whose lifecycle is attached to the context of the activity.

Application context:

  • This application context is attached to the lifecycle of an application.
  • The application context should be used where you need a context whose lifecycle is SEPARATE from the current context or when you are passing a context beyond the scope of activity.
Types of Context
9.

What is a Toast? Write its syntax.

Answer»

Toast is a message that POPS up on the screen. It is USED to DISPLAY the message regarding the status of the operation initiated by the user and covers only the expanse of space required for the message while the user’s recent activity REMAINS visible and interactive.

Toast notification automatically fades in and out and it does not accept interaction events.

Syntax:

Toast.makeText(ProjectActivity.this, "Your message here", Toast.LENGTH_LONG).SHOW();
10.

Mention the difference between class, file and activity in Android?

Answer»

The DIFFERENCE between them is as follows:

  • Class is a compiled FORM of a .java FILE that Android uses to produce an executable .apk file.
  • A file is a block of arbitrary information or resources used for storing information. It can be of any file type.
  • Activity is a single screen that represents GUI(Graphical User Interface) with which users can INTERACT in order to do SOMETHING like dial the phone, view email, etc.
11.

What is an intent?

Answer»

An intent is a messaging object that is USED to request an action from other components of an APPLICATION. It can also be used to LAUNCH an activity, send SMS, send an email, display a web page, etc.

It shows notification messages to the user from WITHIN an Android-enabled device. It alerts the user of a particular STATE that occurred. There are two types of intents in Android:

  • Implicit Intent- Used to invoke the system components.
  • Explicit Intent- Used to invoke the activity class.
Types Of Intents
12.

What is AndroidManifest.xml file and why do you need this?

Answer»
  • The AndroidManifest.xml file contains information regarding the application that the Android SYSTEM must know before the CODES can be executed.
  • This file is essential in every Android application.
  • It is DECLARED in the root directory.
  • This file performs several TASKS such as:
    • Providing a unique name to the java package.
    • Describing various components of the application such as ACTIVITY, services, and many more.
    • Defining the classes which will implement these components.
13.

Explain the dialog boxes supported on Android.

Answer»

Android supports FOUR DIALOG boxes. They are:

  • AlertDialog:
    • The AlertDialog supports 0-3 BUTTONS, along with a list of selectable items such as checkboxes and radio buttons.
    • It is used when you want to ask the user about taking a decision between YES or no in response to any particular action taken by the user, by remaining in the same activity and without changing the screen.
  • DatePickerDialog:
    • It is used for selecting the date by the user.
  • TimePickerDialog:
    • Used for selecting the time by the user.
  • ProgressDialog:
    • It is an extension of the AlertDialog and is used to display a progress bar. It also supports the addition of buttons.
    • This CLASS was deprecated in API level 26 because it prevents the user from interacting with the application. Instead of this class, we can use a progress indicator such as ProgressBar, which can be embedded in the user interface of your application.
14.

Explain Sensors in Android.

Answer»

Android-based devices have a collection of built-in sensors in them, which measure certain parameters LIKE motion, orientation, and many more through their high ACCURACY. The sensors can be both HARDWARE and software based on nature. There are three prominent categories of sensors in Android devices. They are:

  • Position Sensor: It is used for measuring the physical position of the Android device. This has orientation sensors and magnetometers.
  • Motion Sensors: These sensors CONSIST of gravity, rotational activity, and acceleration sensors which measure the rotation of the device or the acceleration, etc.
  • Environmental Sensor: It includes sensors that measure temperature, humidity, PRESSURE, and other environmental factors.
15.

What is the life cycle of Android activity?

Answer»
  • OnCreate(): It is called when activity is created. Using this, the VIEWS are created and data is collected from bundles.
  • OnStart(): It is called if the activity is becoming visible to the USER. It may be succeeded by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.
  • OnResume(): It is called when the activity will start an interaction with the user.
  • OnPause(): This is called when the activity is moving to the background but hasn’t been KILLED yet.
  • OnStop(): This is called when an activity is no longer visible to the user.
  • OnDestroy(): This is called when the activity is finished or destroyed.
  • OnRestart(): This is called after the activity has been stopped, prior to it being STARTED again.
Life Cycle of Android