Android is not only the modified version of Linux Kernel and other open-source software but technology on which a large number of people depend upon worldwide. Picking a great craze among the community, students are developing a keen interest to study. If you are pursuing a career in Android developer, then these are the Interview Questions that should be a part of your bucket list.
What are the different versions of Android OS that you remember?
It has been over 10 years of Android OS in the market and the language has not only upgraded over a course of time but has shown significant variants with dynamic features. The upgrades are as follows.
What are the important core components of Android?
The core components of Android operating systems include the following:
- Content Provider
Define Activity and which method is implemented by all subclasses of an Activity?
An activity represents the screen representation of an application in Android which serves as the primary entry point for the user interaction. Each activity has a structured layout in which you UI can be stationed wherein an application can have multiple activities.
Below are the two methods in which all the subclasses of Activity will implement:
- nCreate(Bundle): This method is the stage of initialization in which you will callsetContentView(int) with a layout resource which defines your UI. findViewById(Int) will enable you to retrieve the widgets in that UI which is required to interact programmatically.
- onPause(): This method involves dealing with the user whenever it leaves the activity. Therefore, any changes made by the user should be committed as done by the Content Provider that holds the data.
Can you elaborate on the lifecycle of Activity?
In this, the user paves its way between multiple screens or apps which is called undergoing different states in their lifecycle. The activity of the lifecycle consists of seven different methods of android.app. Activity as mentioned below:
- onCreate(): This is the state where the activity is created
- onStart(): This callback method is called when the activity becomes visible to the user
- onResume(): In this state, the foreground and the user can interact with it
- onPause(): In this state, the Activity is partially obscured by another activity. On the other side, other activity in the foreground is semi-transparent
- onStop(): In this state, the activity is completely hidden and remains invisible to the user
- onDestroy(): In this state, the Activity is destroyed and removed from the memory
What is the difference between File, Class and Activity?
The difference between the three includes the following:
- File: It is a block of arbitrary information or resources for storing information and can be any file type
- Class: It is a compiled form of Java file which Android uses to produce an executable apk
- Activity: It is the equivalent of a Frame or a Window in GUI toolkits. It is neither a file or nor a file type, but only a class that can be extended in Android to load UI elements on view
What is Google Android SDk and what are the tools placed in SDk?
It is a toolset that offers the API libraries and tools required to build, test and debug to a developer for Android in Windows, Mac or Linux. The tools placed in Android SDk includes:
- Android Emulator
- Dalvik Debug Monitoring Services (DDMS)
- Android Asset Packaging tool (AAPT)
- Android debug bridge (ADB)
Which are the dialog boxes supported by the platform?
Android typically supports four types of dialog boxes which include:
- AlertDialog: It has three buttons and sometimes AlertDialog includes checkboxes and Radio buttons to select the element
- ProgressDialog: It displays the progress bar or wheels
- TimePickerDialog: Using this dialog box, a user selects the Time
- DatePickerDialog: Using this dialog box, a user selects the Date
What are the data types supported by AIDL?
Data Types supported by AIDL includes the following:
- Java data types such as INT, Long, Char, Boolean
What are the advantages of Android?
- Open-source: It means no license, distribution and development fee
- Platform-Independent: It supports Windows, Mac and Linux platforms
- Supports various technologies: It supports camera, Bluetooth, wifi, speech, EDGE
- Highly optimised Virtual Machine: It uses a highly optimised virtual machine (VM) for mobile devices, called DVM (Dalvik Virtual Machine)
List the three key loops when monitoring an activity.
- Entire lifetime: Activity happens between onCreate and onDestroy
- Visible lifetime: Activity happens between onStart and onStop
- Foreground lifetime: Activity happens between onResume and onPause
What are the different storage methods in Android?
The different types of storage methods in Android includes:
- Shared Preferences: Store private primitive data in key-value pairs
- Internal Storage: Store private data on the device memory
- External Storage: Store public data on the shared external storage
- SQLite Databases: Store structured data in a private database
What database is used in Android and how does it differ from client-server database management systems?
Android uses SQLite which is the open-source relational database. The engine in SQLite is server less, transactional and self-contained. The SQLite engine is integrally linked with the application instead of the traditional client-server relationship of most database management systems.
The library can also be called dynamically and makes use of simple function calls that reduce latency in database access.
To get enrolled in our Android Development course, click here.
What is an Android Runtime?
Android Runtime can be described as follows:
- It consists of Dalvik Virtual Machine (DVM) and Core Java libraries
- DVM is optimised for low processing power and low memory environments
- Unlike JVM, the DVM doesn’t run .class files, instead it runs .dex files
Explain the Sensors.
Android-based devices have a built-in-sensors in them, which measure certain parameters such as motion, orientation and more. The sensors help in the monitor of positioning and movement of the device through their high accuracy and can be both software and hardware-based on nature.
The three prominent categories of sensors in Android devices are:
- Position Sensor: It is used to measure the physical position of the Android device. This includes orientation sensors and magnetometers
- Motion Sensors: These sensors include gravity, rotational activity and acceleration sensors which measure the rotation of the device or the acceleration and much more
- Environmental Sensor: It includes sensors that measure temperature, pressure, humidity and other environmental factors
Do all mobile phones support the latest Android operating system?
This question is generally asked to play a trick on the candidate. However, we suggest you answer this question on the basis of your knowledge and research. Because some the Android-powered phone enables you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version.
It depends largely on the capability and technical features of the phone, whether it can support the newer features available under the latest Android version.
If you liked reading this article, then read more about Android here.