In the year 2008 Android came as a popular computing platform, which is based on the Linux operating system. In the smartphone market, it became one of the most leading names that managed to change the whole. In the last ten years time, it grabs the majority of market share sharing with iOS and has effectively become the world most popular operating system. With the maturity of Android, it is finding its new way into a variety of devices, not just on smartphones but also includes televisions, projectors, automobiles and even now the vehicles.
Today with the advent of the Android platform, the Android developers are huge in demand and every sector and industry is looking to recruit them in-house. If you aspire to be an Android developer, then this is just the place for you. Given below is the list of questions, which answers both basic and advanced concepts of Android. These questions if well prepared before an interview shall give an extra edge to the candidate and give confidence of facing the panel:
Android is an open-sourced operating system by Linux that is primarily used in mobile devices like cell phones and tablets. This Linux kernel based system is equipped with high and advanced components that allow developers to create and run apps. Therefore performs the basic as well as the advanced functions.
Android application components are the building block essentially used in the Android application. The application manifest file named Android manifest.xml couples the components. This describes each component of the application and describes how they interact, and then the processing activity takes place.
There are four main components, which are:
A fragment means behavior or the portion of user interface in a Fragment Activity. One can combine multiple fragments in a single activity to build a UI and can reuse the fragment in multiple activities. The fragment can be considered as a modular section of an activity. This has its life cycle, gets its input events, which can be added or removed accordingly. It is must host a fragment in an activity and fragments lifecycle is directly related by the host activity’s lifecycle.
Android provides some options to save or store the app data. Here the choice depends on the specific needs and requirement of space by the users.
Few of the data storage options available on Android are as follows:
To expose one app’s data to other apps, the content provider can be used.
AIDL is Android Interface Definition Language. This IDL allows the user to define the programming interface; both the clients and service agree upon to communicate with each other using inter-process communication (IPC). On Android platform, it becomes difficult for one processor to access the memory of another process. They need to decompose their objects into primitive that the operating system can manage, and marshal the objects across. The code to perform that marshaling is tedious to write therefore Android handles this for the users with the help of AIDL
Services here is an application component that can perform long-duration operations in the background. It doesn’t provide a user interface. Other application components can start a service and can continue to perform/ run in the background when the users switch to some other application. There are three different types of services:
Every application should have an Androidmanifest.xml file at the root of the project source set. This file describes the essential information required by the user for the app to the Android build tools. Apart from this, it is required for the following reasons:
It is an instruction for Android OS that specifies how the activity should be launched or performed. The activities are performed into two areas, which are:
Serializable is a standard Java interface. It is not a part of the Android SDK. Its simplicity is its biggest beauty. Just by implementing this interface the POJO will be ready to jump from one particular activity to another. There is another interface known as parseable. It is a part of the Android SDK. Paracelable was specifically designed in a way that there is no reflection left while using.
The architecture of Android application has few components, which have their functions to perform:
Following are the code names with year:
Advantages of Android are as follows:
Android supports C++, C. The app can be developed in C or C++ using Android NDK (Native development kit). This makes system works faster.
There are seven lifecycle methods of Android activities. They are:
Dialogue box supported by Android are:
Tools used to develop an Android app are as follows:
The Google Android SDK is a set of tools that are used by the developers to write the app on Android-enabled devices. It contains a graphical interface that emulates an Android-driven handheld environment and allows the developers to debug their codes as per the requirements.
A nine- patch image allows the resizing of the image that can be used as background or other image size requirements for the target device. The nine- patch refers to the way one can resize the image. It can be done in the in the following manners
Activities can be closed or can be terminated easily as and when the user wants to. Services are designed to run on the background or behind the scenes and can act independently. Most of the services run on a continuous basis regardless of their certain or no certain activities been executed.
The emulator lets the developers “play” all around the interface that gives the experience of an actual mobile device. It is for writing and testing codes, and debug too. Emulators are safe for testing codes especially if the user is in the early stage of design.
Permission allows certain restrictions to be imposed primarily to protect data and code. Without this, codes could be compromised, resulting in defects in the actual function.
Few of the disadvantages of Android in the mobile market are as follows:
The four initial stages of the activity are as followed:
Activities are windows to an interface. Like a window is created with the aim to display the output and to know about input in the form of a dialogue box. In the same manner, activities play its role, may not always in the form of a user interface.
The important items for Android projects are:
In a general term, the container means some object that can be used to hold or to procure. In a similar manner here, containers are used to hold objects and the widgets altogether.It depends on which specific item is it required and what kind of arrangement is needed. It can be used to hold labels, fields or buttons.
Dalvik plays an important role in the development of Android. It acts as a virtual machine where the Android application runs. It is with the help of Dalvik only that devices can execute multiple virtual machines effectively along with better memory management.
Follow the below steps to create a bounded service through AIDL
Default resources contain the default string and files. If this resource is not present the error will keep occurring, and the app will not be able to run. Resources are placed in subdirectories under the project res/ directory. Moreover, therefore helps the app to function in the desired conditions.
Terminating or killing the foreground activity is the last and final savior. It is generally desirable or is the best time to kill this activity when it is consuming too much of memory. When the memory paging state is reached by the activity, it is killed so that the interface can sustain the responsiveness of the user of the application.
The supporting facility of Android new version depends on the capabilities and specs of the phone. There are few Android power phones that allow the user to update their version to the higher operating version. Few don’t allow getting the updated version work. Either the new feature will not be supported, or the performance of the operating device will slow down.
In the latest update of Android version 6.0, the official Android code name is known as a marshmallow. It was launched in May 2015. This was the successor of the Android version 5.0 named as Lollipop. Google named this version as a marshmallow on 17th August 2015 for Nexus devices.
Never Miss an Articles from us.