Top 10 Android Interview Questions Answers for Java Programmers

Hello guys, if you are preparing for an Android app developer interview and looking for some Android interview questions then you have come to the right place. Earlier, I have shared free Android courses for beginners, and in this article, we will explore some of the most frequently asked Android interview questions. Android is very hot nowadays as its one of the top operating systems for mobile and smartphones and a close rival to Apple's iOS. Android application developer job is in demand as well. I have also seen a couple of Java questions in an Android interview as well. It means it's better to prepare some Java questions as well. 

These Android Interview Questions are very basic in nature but appear frequently on beginners or Intermediate programmer level on various Android interview.  Earlier, I have not provided answers to this question but now I have updated most of them. 

These questions are good for recap and practice before going to the Android interview. If needed I am also thinking to add more Android interview questions with answers in this article, depending upon feedback, if you want you can also contribute Android interview question asked to you, even if you don't know the answers. 

Exploring interview questions is also a good way to learn Android in-depth as it encourages you to research more and on the way you learn subtle things. Btw, if you are new to Android or haven't touched Android for a long time, I suggest you join an up-to-date hands-on course like The Complete Android Oreo Developer Course - Build 23 Apps! on Udemy.  It's a good course to learn and revise essential Android concepts. 


10 Android Interview Questions answers for Java Developers

Here is a couple of interview questions from the Android operating system, It is collected from various telephonic and face-to-face interviews. Any Java programmer can use it to prepare for the Android interview.

Question 1: What is the difference between a regular .png and a nine-patch image?

Answer: This is one of the most popular Android Interview questions, asked in several interviews ranging from 1 to 2 years of experience to 5 years. The answer is, It is a resizable bitmap resource that can be used for backgrounds or other images on the device.

The NinePatch class permits drawing a bitmap in nine sections. The nine patch images have extension as.9.png. It allows an extension in 9 ways like 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.



Question 2: What is an ANR notification in Android?

Answer: ANR is short for Application Not Responding. Android systems show this dialog if the application is performing too much of a task on the main thread and have been unresponsive for a long period of time.


Question 3: How to share content using Android Share Intent?

Share intent is an easy and convenient way of sharing the content of your application with other apps.


Question 4: When does the onResume() method call?

Another frequently asked android interview question. onResume() method is an activity lifecycle method. This is called when the activity comes to the foreground. You can override this method in your activity to execute code when the activity is started, restarted, or comes to the foreground. 

You can further join the Android Java Masterclass - Become an App Developer course on Udemy to learn more about the life-cycle of events in Android. It's a great course to learn Android for Java developers. 

Here is a nice diagram that explains the sequence of different callback methods in Android, including onResume():

Top 10 Android Interview Questions Answers for Java Programmers


Question 5: What is an action in Android?

A description of something that an Intent sender desire is called Action in Android.

Question 6: What is the difference between implicit intent and explicit intent?

There are two types of Intent implicit and explicit intent, let see some more difference between them.

1) implicit:-
Implicit intent when you call system default intent like send an email, send SMS, dial number, etc
like.:
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType("text/plain")
startactivity(sendIntent);

2) Explicit:-
Explicit intent when you call you're on application activity from one activity to another
e.g. first activity to second activity
Intent intent = new Intent(first.this, second.class);
startactivity(intent);
You can also join the Understanding Android Application Basics course on Pluralsight to learn more about Implicit and Explicit Intent. It's one of the best online courses to learn Android basics and how to create awesome Android applications using Activities on Android. 


Question 7: What is the APK format?

The APK file is a compressed AndroidManifest.XML file with extension.apk, Which have application code (.dex files), resource files, and other files that are compressed into a single .apk file.

Question 8: What is the Dalvik Virtual Machine?

Just like Java application run on Oracle HotSpot JVM or Azul JVM,  Android application runs on the Dalvik Virtual Machine.

Question 9: How Android app runs on Android mobile? (answer)

Since Android code is written in Java, they are also compiled first and then executed, but the JVM for which the bytecodes are generated is different than standard JVM. The Dalvik JVM is used to run the Android app. See the answer for a more detailed discussion.

You can also join the Modern Android App Development with Java, an interactive course on Educative to learn more about Android app development using Java Programming language. It's a text-based interactive course where you can learn Android without getting stuck on the setup as you can run code right on your browser online. 

Android Interview Questions and Answers


More Android Questions for Practice

Here are some more frequently asked Android Interview questions for Java Programmers:

1. What is Android? is it an Operating System or programming language?

2. Which programming language is used to develop an application for Android?

3. Which devices have you worked on on the Android platform?
You can name any device you have worked like Samsung Galaxy S5 or any other model but be prepared from some follow-up questions like which Android version those devices support. So, only tell the device where you have worked or have good knowledge to answer follow up questions. 

4. What best practices you follow to ensure that your application work on multiple Android devices of different screen size, processing power, and features?

5. What is Activity and Intent in Android? What is the difference between Activity and Intent?

6. What kind of application have you developed on the Android platform? Games, applications?

7. What is the Android manifest file? Why do you need this?

8. How do you implement Internationalization and Localization in an Android application?

9. How do you find the IMEI and IMSI number of an Android device


If you have faced any interesting Android Questions or looking for the answer to any tricky Java question or Android question then you can share with us as well.

Further Learning
The Complete Android N Developer Course
Modern Android App Development with Kotlin
Android Java Masterclass - Become an App Developer


Other Interview Question articles You may like

Thanks for reading this article. If you like these questions and my explanations then please share them with your friends. If you have any feedback or questions then please share them with us.

5 comments:

  1. Can you please share answer of remaining Android Interview question, also it would be fantastic if share some more Android Interview question for 1 year and 2 year experience Android developers. I have experience in J2ME and programming in Android from 2 years.

    ReplyDelete
  2. I have 8 years of exp in mobile application development, which includes c, brew, and android. I am working as technical lead in Samsung. Thanks for sharing good questions.

    ReplyDelete
  3. Couple of Android questions from my side :
    What is difference between Android and J2ME?
    What is difference between Android and Symbian or Windows Mobile?
    Can you code in Java 8 for Android application? If no, why not?
    What is difference between byte code generated by javac and android ?

    ReplyDelete
  4. Can you please share some Android questions for freshers and 1 year experience? I have done some Android programming for my own projects, which Android topics should I prepared to do well? Does knowing Java is enough for getting Android job? Also what is the difference between Android questions for say 1 year experience or 2 to 3 year experience guy? which topic they asked more on each interview?

    ReplyDelete
  5. public class MainActivity extends ListActivity {

    ListView mListView;
    ArrayList mRoutesList;
    RoutesAdapter mRoutesAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    init();
    new ThreadWorker(this,new RouteHandler()).execute((Object[]) null);

    mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView parent, View view, int position, long id) {

    Intent intent = new Intent(MainActivity.this,RouteDetails.class);
    intent.putExtra("route",mRoutesList.get(position));
    startActivity(intent);
    }
    });

    }

    private void init() {
    mListView = getListView();
    mRoutesList = new ArrayList();
    mRoutesAdapter = new RoutesAdapter(this,mRoutesList);
    mListView.setAdapter(mRoutesAdapter);
    }


    class RouteHandler extends Handler{

    @Override
    public void handleMessage(Message msg) {
    super.handleMessage(msg);
    ArrayList routes = (ArrayList) msg.obj;
    mRoutesList.addAll(routes);
    mRoutesAdapter.notifyDataSetChanged();
    }
    }
    }

    ReplyDelete

Feel free to comment, ask questions if you have any doubt.