Android interview question set 1/Android Interview Questions and Answers for Freshers & Experienced

What Are Support Libraries?

Android Support Libraries are packages that contain code. They support a specific range of Android platform versions and sets of features. Most of these support libraries are now part of the androidx namespace. This is the recommended set of libraries to use.

Posted Date:- 2021-08-23 12:57:00

What Are Quality Guidelines?

Google also provides an extensive list of quality guidelines. You can use this list to ensure that your app adheres to current quality standards. If your app passes these tests, you can be sure it meets your users’ expectations for performance, stability, and security.

Posted Date:- 2021-08-23 12:55:15

What Is Material Design?

Material design is a design language that Google developed in 2014. It consists of the building blocks for your UI components. This language, and the design principles it embodies, are applicable to Android as well as other applications.

Posted Date:- 2021-08-23 12:54:17

What is a Theme?

A theme is nothing but a set of properties that are bundled together in order to define a particular display setting. Android provides a few standard themes that are already listed in the resource file. The properties that include it are text size, color, background color, etc.

Posted Date:- 2021-08-23 12:53:11

How will your application perform actions that are provided by another application, like sending an email?

For this we have Intents. Intents contain an action to be performed, defined within them and they can launch the appropriate activity from another application. The syntax for this is:
Intent i= new Intent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_EMAIL, recipientArray);
startActivity(i);

Posted Date:- 2021-08-23 12:51:51

Where and how do you define the icon for your activity.

We define this icon of the activity inside the manifest file of the application.
To declare it you can write:

<activity android:icon=”@drawable/app_icon” android:name=”.MyActivity”></activity>
Here drawable is a resource file that is present in the res/ folder. It will have an icon with the name app_icon.

Posted Date:- 2021-08-23 12:49:48

Can a standard java bytecode run in Android?

Android makes use of Dalvik Virtual Machine that needs a special bytecode. First, the java class file is converted into a Dalvik executable file using an Android tool. Generally, the developers do not use this tool, build tools to take care of the generation of DVM compatible files.

Posted Date:- 2021-08-23 12:48:33

How to find memory leaks in Android applications?

In Android Studio, there is an Android Device Manager(ADM), which helps in detecting the memory leaks in the Android Platform. Upon opening it, there will be your device/ emulator with a heap sign on the left-hand side of the ADM. While running the app, you can see the heap size, memory analysis, etc. displayed on it.

Posted Date:- 2021-08-23 12:47:50

How do you troubleshoot the android application which is crashing frequently?

Given below are the few steps that we need to follow while troubleshooting the crashing issue:

Free up memory space: There is only limited space available on mobile devices for mobile apps. To avoid crashing issues or memory-related issues, you need to first check the memory space.
Clear app data usage: You can clear the app data using the Application Manager under “Settings”. This will clear the cache memory and allow some free space to install another app or it will boost up your current app.
Memory Management: Some apps run perfectly on one type of mobile device but the same app may not work on another type of device as for such devices the processing power, memory management, and CPU speed is different. For any app to run properly on any type of mobile device, you should manage the memory on the device.
Compatibility issue: It is always not possible to test mobile apps on all mobile devices, browsers, operating systems, etc. So you need to test your mobile app on as many mobile devices as you can in order to avoid any compatibility issue.

Posted Date:- 2021-08-23 12:47:03

What all devices have you worked on?

There are many mobile devices available in the market with different operating systems.

Specifically, I have worked on Android, Windows, Symbian, iPhone, etc

Posted Date:- 2021-08-23 12:46:01

What language is supported by Android for application development?

The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.

Posted Date:- 2021-08-23 12:44:53

What is the .apk extension in Android?

APK stands for Application Package kit. The .apk extension is a default file format used by the Android Operating System. This is used for the installation of the application in any Android device as it contains resource files, certificates, manifest files, and other codes as well.

Posted Date:- 2021-08-23 12:44:02

How do you remove icons and widgets from the main screen of the Android device?

To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.

Posted Date:- 2021-08-23 12:43:14

What do you understand with the nine patch images tool?

With this tool, we can resize the images and change bitmap images into nine sections. These nine sections include four corners, four edges, and an axis.

Posted Date:- 2021-08-23 12:42:27

What are the commit() and apply() methods in Shared Preferences?

The commit() method returns a boolean value by writing the data synchronously. It returns 0 or 1.
The apply() method does not return any response, and it is Asynchronous.
Once you have used the apply() method and then if you call the commit() method, commit() won’t work until apply() finishes first.

Posted Date:- 2021-08-23 12:41:36

What are the event Listeners?

An event listener is the interface of the View class of Android. It invokes a callback method when the user’s action activates the registered View.

Posted Date:- 2021-08-23 12:40:14

What are the event Listeners?

An event listener is the interface of the View class of Android. It invokes a callback method when the user’s action activates the registered View.

Posted Date:- 2021-08-23 12:35:51

Name some User Interface components.

There are many things that come under the UI components. To name some, I would say Text View, Edit Text, Buttons, Image Button, Radio Button, Radio Group, Check Box, Spinner, Progress Bar, and many others.

Posted Date:- 2021-08-23 12:34:04

What is Gradle?

Gradle is an open-source build system that automates the building, testing, deployment, etc. It often uses the Java Virtual Machine supported languages like Java or Scala. It helps the developers by providing them flexibility while developing the application.

Posted Date:- 2021-08-23 12:32:26

What is an ADT, and what is its use?

ADT in Android is an abbreviation of Android Development Tools. It is a very powerful plugin used in Eclipse IDE. It specifically gives an integrated environment to develop Android Applications.

Posted Date:- 2021-08-23 12:31:04

What is an Android Manifest file?

The manifest file describes all the essential information about the project application for build tools, Android operating system, and google play. This file is a must for every Android project that we develop, and it is present in the root of the project source set.

Posted Date:- 2021-08-23 12:30:31

How many layout types are there?

The type of layouts used in Android Apps are as follows:

1.Linear Layout
2.Relative Layout
3.Constraint Layout
4.Table Layout
5.Frame Layout
6.Absolute Layout
7.Scrollview layout

Posted Date:- 2021-08-23 12:29:53

What are layouts?

Layout is nothing but arrangements of elements on the device screen. These elements can be images, tests, videos, anything. They basically define the structure of the Android user interface to make it user friendly.

Posted Date:- 2021-08-23 12:27:37

What are the different ways of storage supported in Android?

The various storage ways supported in Android are as follows:

1.Shared Preference
2.Internal Storage
3.External Storage
4.SQLite Databases
5.Network Connection

Posted Date:- 2021-08-23 12:26:22

How can you launch an activity in Android?

We launch an activity using Intents. For this we need to use intent as follows:

ntent intent_name= new Intent(this, Activity_name.class);
startActivity(intent_name);

Posted Date:- 2021-08-23 12:24:33

Can you develop Android Apps with languages other than Java? If so, name some.

Yes, there are many languages that we can work with, for the development of Android Applications. To name some, I would say Java, Python, C, C++, Kotlin, C#, Corona/LUA.

Posted Date:- 2021-08-23 12:23:26

What are Layout XML files?

Layout XML files contain the structure for the user interface of the application. The XML file also contains various different layouts and views, and they also specify various GUI components that are there in Activity or fragments.

Posted Date:- 2021-08-23 12:23:00

What is a Notification?

A notification is just like a message that shows up outside the Application UI to provide reminders to the users. They remind the user about a message received, or some other timely information from the app.

Posted Date:- 2021-08-23 12:21:58

What do you understand about Shared Preferences?

It is a simple mechanism for data storage in Android. In this, there is no need to create files, and using APIs, it stores the data in XML files. It stores the data in the pair of key-values. SharedPreferences class lets the user save the values and retrieve them when required. Using SharedPreferences we can save primitive data like- boolean, float, integer, string and long.

Posted Date:- 2021-08-23 12:21:25

What do you understand by View Group?

It is the subclass of the ViewClass. It gives an invisible container to hold layouts or views. You can understand view groups as special views that are capable of holding other views, that are Child View.

Posted Date:- 2021-08-23 12:19:53

What is a View?

A view is an important building block that helps in designing the user interface of the application. It can be a rectangular box or a circular shape, for example, Text View, Edit Text, Buttons, etc. Views occupy a certain area of the screen, and it is also responsible for event handling. A view is the superclass of all the graphical user interface components.

Posted Date:- 2021-08-23 12:18:38

Define the three key loops when monitoring an activity.

• Entire lifetime: An activity that happens between onCreate and onDestroy
• Visible lifetime: An activity that happens between onStart and onStop
• Foreground lifetime: An activity that happens between onResume and onPause

Posted Date:- 2021-08-23 12:17:38

What is an ANR notification in Android?

ANR is a short form for ‘Application Not Responding’. Android systems show this dialog if an application is performing too many tasks on the main thread and has been unresponsive for a long time.

Posted Date:- 2021-08-23 12:17:10

What is action in Android?

In Android, an action is a description of something that an intent sender desires.
Contained in:

<intent-filter>

Syntax:

Posted Date:- 2021-08-23 12:16:41

Where can you define the icon for your activity?

The icon for an activity is defined in the manifest file.

Syntax:

<activity android:icon="@drawable/app_icon" android:name=".MyTestActivity"></activity>

This means that we have to open AndroidManifest.xml. Right under the root ‘manifest’ node of the XML, we can see the ‘application’ node. We have added this attribute to ‘application’. (The ‘icon’ in ‘@drawable/icon’ refers to the file name of the icon.)

android:icon="@drawable/icon"

Posted Date:- 2021-08-23 12:12:51

What is the difference between an implicit intent and an explicit intent?

There are two types of intents: implicit intent and explicit intent. Let us see the differences between them.

Implicit intent: It is when we call system default intent like send e-mail, send SMS, or dial number.

For example:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType("text/plain")
startactivity(sendIntent);

Explicit intent: It is when we call our own application activity. We can also pass the information from one activity to another using explicit intent.

For example, from the first activity to the second activity:

Intent intent = new Intent(first.this, second.class);
startactivity(intent);

Posted Date:- 2021-08-23 12:11:30

What is a NinePatch (9-patch) image?

It is a resizable bitmap resource that can be used for backgrounds or other images on a device. NinePatch class permits drawing a bitmap in nine sections. The 9-patch images have an extension as .9.png. It allows extensions in 9 ways, i.e., 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.

Posted Date:- 2021-08-23 12:09:25

Where will you declare your activity so the system can access it?

Activity is to be declared in the manifest file. For example:

<manifest></manifest>
<application></application>
<activity android:name=”.MyIntellipaat”>

Posted Date:- 2021-08-23 12:09:01

Can Android applications only be programmed in Java?

No, not necessarily. We can program Android apps using the Native Development Kit (NDK) in C/C++. The NDK is a toolset that allows us to implement parts of our app using native code languages such as C and C++. Typically, good use cases for NDK are CPU-intensive applications such as game engines, signal processing, and physics simulation.

Posted Date:- 2021-08-23 12:06:56

Why cannot you run the standard Java bytecode on Android?

Android uses Dalvik virtual machine (DVM) which requires a special bytecode. First of all, we have to convert Java class files into Dalvik executable files using an Android tool called ‘dx’. In normal circumstances, developers will not be using this tool directly; build tools will care for the generation of DVM compatible files.

Posted Date:- 2021-08-23 12:06:20

Explain the difference between Implicit and Explicit Intent.

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 component
i.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);

Posted Date:- 2021-08-23 12:04:47

How are escape characters used as attribute?

Escape characters are preceded by double backslashes. For example – a newline character is created using ‘n’.

Posted Date:- 2021-08-23 11:59:24

What is the significance of the .dex files?

Android programs are compiled into ‘.dex’ (Dalvik Executable) files, which are zipped into a single .apk file on the device.
‘.dex’ files can be created by translating compiled applications written in Java.
(.dex) is a format that is optimized for effective storage and memory-mappable executions.

Posted Date:- 2021-08-23 11:59:04

What is a content provider? How is it implemented?

Content providers manage access to a structured set of data. It is the standard interface that connects data in one process with code running in another process.
They encapsulate the data and provide mechanisms for defining data security.
Content providers are used to share the data between different applications.

Posted Date:- 2021-08-23 11:07:55

What is the Adapter in Android?

The adapter, as the name suggests is based on the concept of inheritance. Using the Adapter, you can create a child view on Android to present the items in the parent view.

Posted Date:- 2021-08-23 11:06:43

What do you mean by a Drawable Folder in Android?

The drawable folder in Android is a collection of drawable resources that is used for graphics that can be drawn. Every drawable is stored as an independent file in the drawable folder. It can be used as a background, banner, icons, splash screen, etc.

Posted Date:- 2021-08-23 11:06:17

What is a Toast? Write its syntax.

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();

Posted Date:- 2021-08-23 11:05:42

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

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.

Posted Date:- 2021-08-23 11:04:41

What is a content provider? How is it implemented?

Content providers manage access to a structured set of data. It is the standard interface that connects data in one process with code running in another process.
They encapsulate the data and provide mechanisms for defining data security.
Content providers are used to share the data between different applications.

It is implemented as a subclass of ContentProviderclass and must implement a standard set of APIs that enable other applications to perform transactions.


public class MyContentprovider extends ContentProvider {
public void onCreate(){}
}

Posted Date:- 2021-08-23 11:02:26

What is a sticky broadcast? Give an example.

A sticky broadcast is used for communicating between applications. These broadcasts happen without the user being notified. The Android OS normally treats each application as if it were a separate user. Here’s an example: When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.

Posted Date:- 2021-08-23 11:01:51

Search
R4R Team
R4R provides Android Freshers questions and answers (Android Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,Android interview question set 1,Android Freshers & Experienced Interview Questions and Answers,Android Objetive choice questions and answers,Android Multiple choice questions and answers,Android objective, Android questions , Android answers,Android MCQs questions and answers R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for Android fresher interview questions ,Android Experienced interview questions,Android fresher interview questions and answers ,Android Experienced interview questions and answers,tricky Android queries for interview pdf,complex Android for practice with answers,Android for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .