Our Insights   >   Developer interview questions   >   Best Android and Kotlin Questions You Should Ask Developers at a Job Interview
Best Android and Kotlin Questions You Should Ask Developers at a Job Interview

Best Android and Kotlin Questions You Should Ask Developers at a Job Interview

Developing a mobile app is a powerful way to build a strong, long-lasting connection with clients and users, as well as increase brand awareness. If you are interested in exploring the power of Android mobile apps, at some point, you’ll need to consider opening Android developer jobs

In this post, we will take a closer look at android interview questions HRs and tech specialists typically ask Android developers at interviews. This detailed list will help you assess the skills of candidates more efficiently. 

Non-Technical Questions For Android Developers

HR managers might find assessing a candidate’s technical skills challenging – that’s why it doesn’t make sense for recruiters or non-tech-savvy business owners to delve too much in coding theory. 

When it comes to candidate screening, you can ask these android developer interview questions.  We also wrote a post that covers other advanced behavioral software developer interview questions – be sure to take a look at it. 

Question #1. Why did you leave your last workplace?

Commentary: This question helps weed out candidates with commitment issues, as well as find out what job characteristics are important for a developer – a high software developer salary, a flexible schedule, challenging assignments, or busy social life. 

Question #2. Imagine a manager assigns you to handle a project, the requirements of which are unrealistic. How will you act?

Commentary: This question tests the candidate’s assertiveness and communication skills. Ideally, a candidate you are interviewing should say that he’ll communicate his concerns to a manager, backing his points with data and research. 

Question #3. Describe a goal you accomplished last year. 

Commentary: Asking such application developer interview questions helps test a programmer’s honesty and determination. If a candidate is capable of understanding his limits and put reachable goals, it’s likely he will be a valuable asset in reaching your business objectives as well. 

Question #4. What are you reading?

Commentary: Although this android interview question might be unexpected at a software development interview, asking something personal is a powerful ice-breaker and gives talent managers more insight into the candidate’s personality. 

Technical Android Development Interview Questions

If a programmer candidate is a fit for the company based on the outcome of the behavioral interview, it’s time to move on to assessing a developer’s tech skills. Here is an android question list covering different aspects of Android development a tech team lead can ask a programming candidate. 

Java Android Developer Interview Questions

Question #1: Describe the types of Java References 

types of references

Answer: there are three types of Java references: 

  • SoftReference – if the GC sees that an object is accessible only through a chain of soft links, it will delete it from memory if there is not enough memory. SoftReference convenient for caching.
  • WeakReference – if the GC sees that an object is accessible only through a chain of weak links, it will delete it from memory. WeakHashMap is one of the most common ways to implement WeakReference. This is an implementation of Map<K,V> which stores the key using a weak link. As soon as GC deletes the key from the memory, it removes the entire Map record. 
  • PhantomReference – if the GC sees that an object is accessible only through a chain of phantom links, the object will be removed from the storage. There are two peculiarities of this type of reference. The first is that the get() method always returns null. This is why it makes sense to use PhantomReference only with ReferenceQueue. The second feature is that, unlike SoftReference and WeakReference, GC will add a phantom link to ReferenceQueueue after get() is executed. 

Question #2: What is the difference between Volatile/Atomic classes?

Answer

  • Volatile marks the object as available for several treads. The class works only for atomic operations. For example, the increment operation is not atomic, so the process will crash.
  • Atomic classes use the compare-and-swap algorithm meaning that they update the value only if the expected and actual values match.

Question #3: describe the Handler mechanism

Handler mechanism description

Answer: Handler is a mechanism that allows working with a queue of messages shared by different threads. It binds to a thread and works with its queue. 

When a candidate is answering Android questions, he should mention that handlers can place messages in a queue – at the same time, they will be treated as recipients. When the time comes, the system picks the message out of the queue and sends it to the recipient (i.e. Handler) for processing.

Question #4: what is the difference between interfaces and abstract classes?

Answer: the main differences between abstract classes and interfaces are the following: 

  • Variables in the interface are final by default
  • Access modifiers can be used in an abstract class, the default interface is all public
  • You can inherit several interfaces, but only one class

Questions on Activity

Question #1: Describe the Activity Lifecycle

Answer: here’s the brief review of methods used throughout the lifecycle:

Activity lifecycle for Android developers

  • OnCreate() creates a view.
  • OnStart() Activate becomes visible
  • OnResume() Activate becomes available for user input
  • OnPause() Activate is visible, but not available for user input (important for multi-window mode).
  • OnStop() Activate is no longer visible
  • OnDestroy() Activate is destroyed
  • OnRestart() Activation is recreated, called after destruction and before creation.

Question #2: Which methods are called when switching between activities?

Answer: the methods used to switch between activities are: 

  • onCreate
  • onStart
  • onResume A: (transition) 
  • onPause B: onCreate
  • onStart
  • onResume A: onStop B: (reverse transition) onPause A: onRestart
  • onStart
  • onResume B: onStop
  • onDestroy 

Question #3. In which cases onDestroy() is called without onPause() and onStop()?

Answer: This happens if you activate the finish() method before onStart and onResume.

Question #4. Why setContentView() is placed in onCreate()

Sect Content View

Answer: This is a resource-demanding operation, and it is sensible to do it only once when creating an activation.

Question #5. Name and describe Launch modes

Answer: there are four main Launch modes an application developer would use

  • Standard When a call is made, the activation is recreated.
  • SingleTop Activation is created anew (in case it is not at the top of the activation-stop.
  • The SingleTask Stack is erased until it is activated at the top of the stack.
  • SingleInstance is similar to SingleTask by function. However, keep in mind that, when you create an activation, it will go into a new push.

Question #6. How do you clear the back stack when creating an activation?

Answer: here’s how you can clear a stack when creating an activation: 

  • Use the FLAG_ACTIVITY_CLEAR_TOP flag.
  • Use FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK together.

Question #7. Specify the difference between FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_CLEAR_TOP

Answer: the first one will clean up everything in the sack. 

As of the second, the cleanup only applies to the activation a developer has started.

Question #8: What are other ways to activate object saving except for onSaveInstanceState) when recreating.

Answer: to activate object-saving, developers typically use onRetainCustomNonConfigurationInstance() and getLastCustomNonConfigurationInstance() from the FragmentActivity (или AppCompatActivity) class. 

Fragment-related questions for Android developers

Question #1: Specify the difference between commit(), commitNow(), commitAllowingStateLoss() и commitNowAllowingStateLoss()

Answer: let’s take a closer look at the differences between these four methods: 

  • If you call commit() after onSaveInstanceState(), the system will return an IllegalStateException.
  • In this case, commitAllowingStateLoss() will not cause an exception, but the state of the fragment manager could be lost.
  • commit() places a transaction a system will execute as soon the main thread is free. You can use executePendingTransactions() method for synchronous execution of hanging transactions. Alternatively, the commitNow() method will execute the transaction at once but will not put it into the back stack.

Content Provider Android Developer Interview Questions

Question #1: Why do you need a Content Provider?

Answer: Content Provider allows data transfer between applications and processes. The programmers handling software application developer jobs often use it in conjunction with ContentResolver.

Android Developer Questions: Services

Question #1: Describe the startService() method

Answer: the method does not replicate service instances, but creates a queue of jobs for it. If IntentService simply executes all tasks one by one, thanks to the Service class, developers have the possibility to run tasks simultaneously in independent threads. Creating new threads for each task in the onStartCommand method is all it takes to execute multiple tasks at once.

Question #2: Explain the concept of stop service

Answer: A service created with the class of the same name will live until it is forcibly stopped. This can be done either from somewhere outside using the stopService method, specifying the intranet by which it was launched or inside the service itself using the stopSelf method.

Question #3: How do you update the UI stream using the background service

Answer: typically, developers use Local Broadcast to update the UI stream.

Make it easier to hire Android developers by contacting Bridge Teams – a team of professional global talent managers.

Advanced Android Developer Interview Questions:

Question #1: Describe the difference between Serializable and Parcelable

Difference between Parceable and Serializable

Answer

Serializable uses reflection, a rather slow process, – on the flip side, a developer needs to write less code. 

In Parcelable, a developer describes the objects that need to be serialized manually, which, in turn, leads to dealing with more code.

Question #2: What are the main types of intents?

Answer: Here’s an Android cheatsheet on intents: 

  • Implicit Calling the system intranet, used to send a text or a call, open cards, etc.
  • Explicit Call others to activate inside the application
  • Sticky Intent, which remains after the end of the broadcast. For example, when a developer subscribes to ACTION_BATTERY_CHANGED, he sends the last Intent. So, if you need to keep the current state of the battery, it is not necessary to keep tracking broadcasts.
  • Pending Intent that may be executed in the future as your application.

Question #3: Can the application work combining different processes? Why is this an important feature? How can interprocessor interaction be organized?

Answer:among all developer interview questions, let’s divide the answer to this one into three parts so that it answers each question explicitly. 

  • Yes, it can. There are parts of the application (activate, services, broadcasts, and content providers) for which a developer needs to specify the process flag.
  • Interprocessors allow developers to access more storage space
  • Since each process lives in a separate Dalvik instance, it is difficult to share information. That’s why tech teams use AIDLs, intents, handlers, and messengers.

Kotlin Interview Questions

Functions

Question #1: Why is the keyword inline in the cauldron?

Answer: In Kotlin, functions are treated like any other values: they can be transferred to and returned from methods, stored in variables, or in data structures. To support this, Kotlin uses a family of functional types. Then, to work with lambda, Kotlin creates objects that implement Function0, Function1, and so on.

Question #2: Why do developers use reified?

Answer: In Java, there is such a concept as Type Erasure – erase types. In short, this is a problem that occurs when working with generics. 

Because of it, for example, you can’t do a check of a new ArrayList<String>() instance of List<String> type: in the java time, the machine doesn’t know which data types are inside the generator.

Since Android Kotlin uses Java time, the problem remains: we can’t check that arrayListOf<String>() is List<String>. However, using inline functions helps avoid type erasure by applying the modifier reified to the generator: inline fun < reified T> myGenericFunction(value: T): T {…}.

Question #3: Describe the differences between crossinline and noinline.

Answer: Since we embed the lambda code at the place of call, return, written in lambda, will finish the execution of the whole function, not the lambda. When we don’t need it, we can mark the lambda parameter of the function as crossinline, which will prohibit non-local loops. inline fun function(crossinline nonLocalReturnBlockedLambda: () -> Unit) {…}

To hire skilled Kotlin developers, let experience HR managers from Bridge Teams handpick a top-notch team for your next project!

Moxy mobile developer interview questions

Question: What is the purpose of Moxy?

Answer: Moxy creates $$PresenterBinder, stores hashmaps with binders in MoxyReflector

RxJava

Question #1: What subjects are there in RxJava?

Answer: there are four types of RxJava subjects: 

  • Publish Subject: Issues all subsequent elements of the observed source at the time of subscription.
  • Replay Subject: Issues all source elements of the Observable, regardless of when a subscriber subscribes.
  • Behavior Subject emits the most recently created element and all subsequent elements of the observed source when the observer joins it.
  • Async Subject returns only the last value of the observed source. If a subscriber wants to access the content, you should call onComplete on the sub jacket.

Question #2: What are the differences between flatMap / switchMap / concatMap / concatMapEager?

Answer

  • flatMap does not follow the order of the obtained values. It creates its own observable for each of the values passed to it and can come in any order.
  • switchMap when a new object appears from observable above, it will unsubscribe from the rest – it gets only the last of the values.
  • concatMap is similar to flatMap but keeps the order of values. There is a downside: concatMap waits for the declaration of each observable before moving on to the following one.
  • concatMapEager is similar to concatMap but it runs the code observable asynchronously.

Hire Android Developers With Bridge

If you are having a hard time finding skilled Android developers or their salary expectations are too high, consider expanding your field of view and look for talent abroad. Opening a global office is a way to cut development costs, improve the speed of development, and establish a stellar reputation for your company. 

At Bridge, we help businesses of all scales build reliable teams abroad. Our hiring experts handpick candidates and conduct a detailed behavioral and technical android interview for all Android and Kotlin development candidates. 

Other than that, we offer business managers a custom tool for managing the global team. You will be able to monitor onboarding, track expenses, and access documentation via an intuitive talent management platform. 

How to start a global team? Find out which locations we source talent for and calculate the cost of maintaining your future team. To get in touch with us, leave a message!

 

Share this blog post

Subscribe to Bridge blog updates

Get our greatest hits delivered to your inbox once a month. No spam. We promise!


Top 30 iOS Developer Interview Questions to Ask Swift and Objective-C Programmers
Developer interview questions
November 24, 2020

Top 30 iOS Developer Interview Questions to Ask Swift and Objective-C Programmers

iOS applications are a powerful way to stand out among competitors, raise brand awareness, and connect with users on a deeper, personal level. According to statistics, mobile users spend 50% of their device time using apps — that’s why investing in building a mobile product is reasonable.  On the other hand, statistically, over 30,000 new …

Top 30 iOS Developer Interview Questions to Ask Swift and Objective-C Programmers Read More »

30 PHP and Laravel Developer Interview Questions to Help You Find a Perfect Fit
Developer interview questions
November 2, 2020

30 PHP and Laravel Developer Interview Questions to Help You Find a Perfect Fit

PHP is one of the most popular languages programming learners start with. According to statistics, in 2018, there were 5.5 million PHP developers. Compared to 2013, the number grew by 500,000 new developers — this exponential growth trend will likely hold through this decade as well.  While having a wide pool of programmers to choose …

30 PHP and Laravel Developer Interview Questions to Help You Find a Perfect Fit Read More »

20 Basic and Advanced Elixir Interview Questions to Hire Top-Notch Developers For Your Team
Developer interview questions
October 27, 2020

20 Basic and Advanced Elixir Interview Questions to Hire Top-Notch Developers For Your Team

Although Elixir is not the most popular language among developers, it’s still widely used for developing scalable applications. Leveraging on the syntax of Erlang and the features of Ruby, Elixir is known for its high-level performance and code reusability. Although the technology is template-friendly and relatively easy to master, when looking for an Elixir developer, business …

20 Basic and Advanced Elixir Interview Questions to Hire Top-Notch Developers For Your Team Read More »

This website uses cookies to improve your user experience. Check our privacy policy here.