Android was launched in the year 2007 by search engine giant, Google. Android is also known by codes names such as Oreo, Nougat, Marshmallow, Lollipop, Kitkat, Jelly Bean, Ice cream Sandwich, Froyo, Ecliar, Donut, etc. It is a software package developed on the platform of Linux operating system, especially designed for mobile devices such as smartphones, tablet computers, and other small internet savvy devices. Android, it is an open-source operating system, which aims to create a successful real-world product to empower mobile experience for end users. The important feature of Android is that it offer support for messaging services, connectivity (GSM, CDMA, Blue Tooth, Wi-Fi), entertainment, tools, communication, web browser, storage, social media and video, travel and local, productivity, personalization, music and audio, etc.
The Application class in Android is the base class within an Android app that contains all other components such as activities and services. The Application class, or any subclass of the Application class, is instantiated before any other class when the process for your application/package is created.
A Context is a handle to the system; it provides services like resolving resources, obtaining access to databases and preferences, and so on. An Android app has activities. Context is like a handle to the environment your application is currently running in.
Application Context: This context is tied to the lifecycle of an application. The application context can be used where you need a context whose lifecycle is separate from the current context or when you are passing a context beyond the scope of an activity.
Activity Context: This context is available in an activity. This context is tied to the lifecycle of an activity. The activity context should be used when you are passing the context in the scope of an activity or you need the context whose lifecycle is attached to the current context.
There are 3 CPU architectures in Android. ARMv7 is the most common as it is optimised for battery consumption. ARM64 is an evolved version of that that supports 64-bit processing for more powerful computing. ARMx86, is the least used for these three, since it is not battery friendly. It is more powerful than the other two.
Android uses DVM (Dalvik Virtual Machine ) rather using JVM(Java Virtual Machine).
Build types define properties that Gradle uses when building and packaging your Android app.
Android application architecture has the following components:
Activities are basically containers or windows to the user interface.
The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes.
AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.
An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.
Intents displays notification messages to the user from within the Android enabled device. It can be used to alert the user of a particular state that occurred. Users can be made to respond to intents.
The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.
Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.
Android framework is a set of API’s using which the Android developers write code for the mobile apps. It contains the methods and classes to write the programming code.
Android framework includes a different set of tools to create image pane, text field, buttons, etc. It also includes “Activities” with which the user interacts and “Services”, which are the programs that run in the background. It is a package of different components like Intents, Broadcast Receivers, Content Providers, etc.
Service is an Android component which runs in the background and acts independently. It does not provide any user interface.
Though the services are running behind the scene, a user can continue their work on different apps. Most of the time, the users are not aware of the services which are running in the background. These services allow the system to kill the process without interrupting the user’s ongoing work.
A service is implemented as a subclass of Service class:
Public class MainService extends Service
Implicit Intent calls the system components while explicit Intents invoke the Activity class.
Once the permissions are set for the app development, then the data and code are restricted to the authorized users only.
If the code is kept without any restriction or if it is accessible to anyone then there are chances of compromise of code which results in defect leakage.
ANR stands for Application Not Responding. It is a notification or pop-up displayed by the Android platform whenever the application is performing too many functions at a time and if it is suddenly not responding for a long time to the user action.
In the Android platform, there are remote methods which facilitate the use of methods from one program to another. To create and implement the remote methods the first step is to define communication interface in AIDL.
AIDL stands for Android Interface Definition Language. It facilitates the communication between the client and service. It also communicates the information through inter-process communication.
For communication between processes, the data is broken down into chunks which are easily understandable by the Android platform.
To understand the cause of the failure or cause of any issue, debugging is important. On the Android platform Android Monitor.bat utility is used while on iOS platform, iPhone Configuration utility is used for debugging purposes.
There are different tools for debugging which include – Android DDMS, Android Debug Bridge, iOS simulator, Debugging from Eclipse with ADT, Remote debugging on Android with Chrome etc.
Emulators are used for performing similar kind of testing which is performed on the real devices. Basically, emulators are used as a replacement for real devices as sometimes real devices are not available for testing, use of real mobile devices for testing purpose is costlier at times.
But there are few scenarios which cannot be tested using emulator, these can be tested only using real devices. These scenarios are interrupted scenarios i.e. message, phone call interruption while using the app, low battery, Bluetooth, memory card mount and unmount etc.
There are quite a few mobile automation testing tools that are available in the market but these are used only if the project requires it and if the application supports the automation.
These tools are paid as well as free tools, hence analysis needs to be done within the project team and then the appropriate mobile automation tool needs to be selected. Silk Mobile, SeeTest, Ranorex are the paid mobile automation tool while Appium, KIF, Robotium, Calabash are few free tools.
Escape characters are preceded by double backslashes. For example – a newline character is created using ‘n’.
One technique that prevents the Android system from concluding a code that has been unresponsive for a long period of time is to create a child thread. Within the child thread, most of the actual tasks of the codes can be placed so that the main thread runs with minimal periods of unresponsive time.
A class which can create only an object, that object can be share able to all other classes.
Fragment is a piece of activity, if you want to do turn your application 360 degrees, you can do this by fragment.
Sleep mode mean CPU will be sleeping and it doesn't accept any commands from android device except Radio interface layer and alarm.
World has 7 billion occupants. Job markets are thrashed every day by the tides developing at international summits, equity markets, and global tie-ups. Overall, such events have raised the average unemployment rate in the job market places. However, it is fortunate that the requirement of Android developers, Android programmers, and Android engineers have increased at the higher side. Applicants with in-depth knowledge and skill-based experience in Android technology are able to sale through the ups and down of the market easily. They are taking the full advantage of technological expansion, which depends upon Android technology. Besides, Android has occupied the topmost place in the arena of operating system as it delivers a range of features to the developers. An Android developer or programmer is expected to enjoy minimum salary of 45, 000 dollars per annum. Although the salary of an experienced Android developer can reach to double the figure mentioned before. The salaries are very dependent upon the location, business, and the company’s requirements.
The article ‘Android interview questions’ has answered every advanced Android interview questions. Additionally, the considerate structured of the Android interview questions for experienced is being planned by our experts, which might have assisted professionals in getting answers to all their qualms and not clear concepts. Even then, if candidates are still stressed with their confusions and doubts, they may drop in a message related to Android query or to our experts regarding Android interview questions for experienced professionals. Our trainers would be happy to assist and resolve all your Android-programming issues of the students. Join Android Training in Noida, Android Training in Delhi, Android Training in Gurgaon