TOP 30 Android Developer Interview Questions
TOP 30 Android Developer Interview Questions
Interview Question
Q1. What is the latest version of Android? List all the versions of
Android.
Ans: The most recent version, Android 13, was published on August 15, 2022,
while the recently released Android 12.1/12L offers advancements for
foldable phones, tablets, desktop-sized screens, and Chromebooks.
Every other Android version has been named after either sweet or desserts.
The following table represents the Android name, version and the year of
release.
©Topperworld
4.0 – 4.0.4 Ice Cream Sandwich 2011
It serves as an entry point for the user’s interaction. Each activity has a
layout file where you can place your UI. An application can have different
activities. For example, facebook start page where you enter your
email/phone and password to login acts as an activity.
Below are the two methods which almost all subclasses of Activity will
implement:
➢ onCreate(Bundle):
©Topperworld
It is a method where your initialization is done. Under this, you will
callsetContentView(int) with a layout resource which defines your UI. Also,
you can retrieve the widgets in that UI by using findViewById(Int). These are
required to interact programmatically.
➢ onPause():
It is a method which deals with the user whenever it leaves the activity.
1
2 public class MainActivity extends Activity {
}
©Topperworld
Android helps in understanding your tastes and needs, by giving various
features such as having wallpapers, themes, and launchers which completely
change the look of your device’s interface.
Android has plenty of features. Some of the features are listed below:
⚫ Open-source
⚫ Customizable operating System
⚫ Variety of apps can be developed.
⚫ Reduces overall complexity
⚫ Supports messaging services, web browser, storage(SQLite),
connectivity,media and many more.
©Topperworld
Each layer in the architecture provides different services to the layer just
above it.
⚫ Linux Kernel
⚫ Libraries
⚫ Android Framework
ANS: Java is the official programming language for Android App development.
It is also possible to develop in C/ c++ language using NDK (Android Native
Development). However, the major parts of Android are written in Java
programming language and the APIs are also designed primarily from Java.
©Topperworld
extension and has all the application code, resource files, certificates, and
other files, compressed in it.
➢ onResume(): The activity is in the foreground and the user can interact
with it.
➢ onStop(): The activity is completely hidden and not visible to the user.
➢ onDestroy(): Activity is destroyed and removed from the memory.
©Topperworld
Q8. Define intents in Android. What are the different types of intents?
©Topperworld
❖ Flutter Application Development Course
Explore Curriculum
❖ Types of Intent:
➢ Implicit Intent:
Implicit intent is when the target component is not defined in the intent and
the android system has to evaluate the registered components based on the
intent data.
➢ Explicit Intent:
©Topperworld
ANS:Implicit Intent is used whenever you are performing an action. For
example, send email, SMS, dial number or you can use a Uri to specify the data
type.
For example:
1
2 Intent i = new
Intent(ACTION_VIEW,Uri.parse("<a
href="https://topperworld.in/">https://topperworld.
in/</a>"));
startActivity(i);
Explicit, on the other hand, helps you to switch from one activity to another
activity(often known as the target activity). It is also used to pass data
using putExtra method and retrieved by other activity by
getIntent().getExtras() methods.
For example:
1
2
3
4 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);
©Topperworld
Q10. What is an Android Framework?
It is a set of APIs that allows developers to write apps and has the following
components:
©Topperworld
Q11. What is the difference between File, Class, and Activity in
android?
Q12. What is Google Android SDK? What are the tools placed in
android SDK?
ANS:The Google Android SDK is a toolset that provides a developer the API
libraries and tools required to build, test, and debug apps for Android in
Windows, Mac or Linux.
⚫ Android Emulator
⚫ DDMS – Dalvik Debug Monitoring Services
©Topperworld
⚫ AAPT – Android Asset Packaging tool
⚫ ADB – Android debug bridge
ANS:
Syntax:
1 Toast.makeText(ProjectActivity.this, "Your
message here", Toast.LENGTH_LONG).show();
©Topperworld
Q15. What is an ANR? What are some measures you can take to
avoid ANR?
©Topperworld
Q16. What are broadcast receivers? How is it implemented?
ANS:
1
2
3 public class MyReceiver extends
BroadcastReceiver {
Public void onReceive(context,intent){}
}
ANS:
©Topperworld
• We can use Bundles to pass data to sub-activities.
• There are like HashMaps that and take trivial data types. These Bundles
transport information from one Activity to another
1
2
3 Bundle b=new Bundle();
b.putString("Email","[email protected]");
i.putExtras(b); // where I is intent
According to Android, “this class is the basis upon which you can roll your
own web browser or simply display some online content within your Activity. It
uses the WebKit rendering engine to display web pages and includes methods
to navigate forward and backward through a history, zoom in and out,
perform text searches and more.
©Topperworld
Q19. What are the different kinds of context in Android?
Q20. Explain in brief about the important file and folder when you
create a new app?
ANS:
java source file. Under this, you create all the activities which have .java
extensions and all the code behind the application.
©Topperworld
• Gradle Scripts – This is an auto-generated file which contains
compileSdkVersion, buildToolsVersion, applicationId, minSdkVersion,
targetSdkVersion, versionCode and versionName
ANS: Android offers several options to see persistent application data. They
are:
ANS:No, Android does not support JAR deployments. Applications are packed
into Android Package(.apk) using Android Asset Packaging Tool (APT) and then
deployed on to the Android platform.
©Topperworld
Q23. What is a Service? How is it implemented?
1
2 public class MyService extends Service {
}
ANS:
©Topperworld
• gen: contains the .R file, a compiler-generated file that references all
the resources found in your project.
• bin: contains the Android package files .apk built by the ADT during the
build process and everything else needed to run an Android application.
• res/drawable-hdpi: this is a directory for drawable objects that are
designed for high-density screens.
• res/layout: this is a directory for files that define your app’s user
interface.
• res/values: this is a directory for other various XML files that contain a
collection of resources, such as strings and colors definitions.
• AndroidManifest.xml: this is the manifest file which describes the
fundamental characteristics of the app and defines each of its
components.
©Topperworld
⚫ It names the Java package for the app as the package name serves as a
unique identifier for the application.
⚫ It protects the application by declaring permissions in order to access
protected parts of the API and interact with other applications.
⚫ Manifest file declares the minimum level of the android API and list the
libraries which is linked with the application.
⚫ Manifest file list the instrumentation classes.
⚫ These classes provide profiling and other information as the
application runs, but this information is removed as soon the
application is publishes. It remains only till the application is in
development mode.
Fragment is a modular section of an activity, with its own lifecycle and input
events, and which can be added or removed at will. Also, a fragment’s
lifecycle is directly affected by its host activity’s lifecycle i.e. when the
©Topperworld
activity is paused, so are all fragments in it, and when the activity is destroyed,
so are all of its fragments.
The library can also be called dynamically and makes use of simple function
calls that reduce latency in database access.
©Topperworld
Q30. What is DDMS?
ANS:DDMS stands for Dalvik Debug Monitor Server. It gives the following
array of debugging features:
©Topperworld
ABOUT US
➢ Our Vision
❖ Our vision is to create a world where every college student can easily
access high-quality educational content, connect with peers, and achieve
their academic goals.
❖ We believe that education should be accessible, affordable, and engaging,
and that's exactly what we strive to offer through our platform.
©Topperworld
❖ Education is not just about textbooks and lectures; it's also about forming
connections and growing together.
❖ TopperWorld encourages you to engage with your fellow students, ask
questions, and share your knowledge.
❖ We believe that collaborative learning is the key to academic success.
©Topperworld
“Unlock Your
Potential”
With- Topper World
Explore More
topperworld.in
Follow Us On
E-mail
[email protected]