Hard android interview questions even the most seasoned candidates might consider a challenge
Before you proceed with the interview, it is important to quickly screen the resumes to find out whether the candidate is suitable for the position he is applying for. Quick elimination of week candidates may save you hours of unfruitful interviews, so take a close look at primary features and skills that junior, mid and senior Android developer should possess:
Needless to say, the essential requirements mentioned above are just the core of every Android developer, who should also possess numerous additional skills. Technical expertise is the most vital for each engineer, so we will start by listing the most desired hard skills of a mobile apps programmer.
The ultimate goal of an interview is to verify if the applicant is a good (or bad) fit to a company. Here are some signs that should warn employers about a potentially mediocre employee.
Below we would like to present you a few interview questions even the most qualified candidates might consider a challenge. If you need more inspiration, visit android.com.
Normal permissions – cover areas where your app needs to access data or resources outside the app’s sandbox, but where there is very little risk to the user’s privacy or the operation of other apps. For example, permission to set the time zone is a normal permission. If an app declares in its manifest that it needs normal permission, the system automatically grants the app that permission at install time. The system does not prompt the user to grant normal permissions and users cannot revoke these permissions.
Signature permissions – the system grants these app permissions at install time, but only when the app that attempts to use permission is signed by the same certificate as the app that defines the permission.
Dangerous permissions – cover areas where the app wants data or resources that involve the user’s private information, or could potentially affect the user’s stored data or the operation of other apps. For example, the ability to read the user’s contacts is a dangerous permission. If an app declares that it needs a dangerous permission, the user has to explicitly grant the permission to the app. Until the user approves the permission, your app cannot provide functionality that depends on that permission. To use dangerous permission, your app must prompt the user to grant permission at runtime.
Special permissions – there are a couple of permissions that don’t behave like normal and dangerous permissions. SYSTEM_ALERT_WINDOW and WRITE_SETTINGS are particularly sensitive, so most apps should not use them. If an app needs one of these permissions, it must declare the permission in the manifest, and send an intent requesting the user’s authorization. The system responds to the intent by showing a detailed management screen to the user.
Background execution limits:
In order to improve device performance, the system limits certain behaviors by apps that are not running in the foreground. Specifically:
By default, these restrictions only apply to apps that target O. However, users can enable these restrictions for any app from the Settings screen, even if the app has not targeted O.
Android background location limits:
In order to preserve battery, user experience, and system health, background apps receive location updates less frequently when used on a device running Android 8.0. This behavior change affects all apps that receive location updates, including Google Play services.
These changes affect the following APIs:
onPause() and onStop() will not be invoked if finish() is called from within the onCreate() method. This might occur, for example, if you detect an error during onCreate() and call finish() as a result. In such a case, though, any cleanup you expected to be done in onPause() and onStop() will not be executed.
Although onDestroy() is the last callback in the lifecycle of an activity, it is worth mentioning that this callback may not always be called and should not be relied upon to destroy resources. It is better have the resources created in onStart() and onResume(), and have them destroyed in onStop() and onPause(), respectively.
Construction arguments for a Fragment are passed via Bundle using the Fragment.setArgument(Bundle) method. The passed-in Bundle can then be retrieved through the Fragment.getArguments() method in the appropriate Fragment lifecycle method.
It is a common mistake to pass in data through a custom constructor. Non-default constructors on a Fragment are not advisable because the Fragment may be destroyed and recreated due to a configuration change (e.g. orientation change). Using #setArguments()/getArguments() ensures that when the Fragment needs to be recreated, the Bundle will be appropriately serialized/deserialized so that construction data is restored.
The sensor framework that forms a part of the Android package has Sensor and SensorManager classes. But these classes do not provide the hasSystemFeature() method. So they cannot be used for evaluating a system’s capabilities. The PackageManager class can, in fact, be used to find out information about the application packages available on a given device. One way of checking the presence of a Compass sensor on the system is:
PackageManager myCompass = getPackageManger();
// This device lacks a compass, disable the compass feature
The answer to this question is our secret – almost nobody outside of DevsData can answer it 😉 Only our developers who made it through our interview process. This is the way of how we are able to make sure to hire the best of the best!
Basically, there are two main programming languages used for the purpose of designing Android apps – Java and Kotlin. It is an absolute must-have in the candidate’s resume and even a junior Android developer should know at least one of them like the back of his hand. Should you recruit a developer to update an existing Android app, you have to hire a developer who is proficient at the original language of this app.
On the other hand, if you design a mobile application from scratch, you may be wondering which of the languages will be more suitable for your project. Below we present a short description of each of the languages in order to let you better understand the differences between these two languages.
Java is the most popular programming language for Android apps, as Android itself was written in Java. It is also the most supported by Google and has a vast online support community which can help a developer who encounters troubles regarding his code. On the other hand, its complexity may result in delays with the project’s delivery – particularly if you want to hire less experienced developers.
Kotlin is a language explicitly designed to build Android apps. It first appeared in 2011 and can interoperate with Java. Kotlin is simpler than Java and does not contain many unnecessary features that slow down the development process. In May 2019 Google announced that from then on Kotlin became a preferred programming language for Android apps development.
The aim of the above interview questions is to test the applicant’s technical knowledge and skills to the fullest so that you can eventually hire Android developer to work for you. At DevsData we believe that the above-presented questions will help you to get thoroughly prepared for the interview.
Anyway, there is one thing related to the interview that is rarely distinguished, yet greatly significant – soft skills. Programming revolves mostly around teamwork. It might not matter how huge your technical knowledge is if you are not able to communicate properly or organize your work. The key to being an exceptional programmer is finding a balance between what your knowledge is and how you work. So do not rest on laurels, keep developing!
This article is also available in German – Android Entwickler.
DevsData – a premium technology partner
DevsData is a boutique software and recruitment agency. Get your software project done by Google-level engineers or scale up an in-house tech team with developers with experience relevant to your industry.
Free consultation with a software expert
Book a free consultation
“DevsData LLC is truly exceptional – their backend developers are some of the best I’ve ever worked with.”
MENTOR AT YC,
“I interviewed about a dozen different firms. DevsData LLC is truly exceptional – their backend developers are some of the best I’ve ever worked with. I’ve worked with a lot of very well-qualified developers, locally in San Francisco, and remotely, so that is not a compliment I offer lightly. I appreciate their depth of knowledge and their ability to get things done quickly. “
CEO OF ORANGE CHARGER LLC;
MENTOR AT YCOMBINATOR