Our Best Offer Ever!! Summer Special - Get 3 Courses at 24,999/- Only. Read More

Noida: +917065273000

Gurgaon: +917291812999

About Android

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.

Android Interview Questions And Answers

1. What is Application?

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.

2. What is Context?

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.

3. What is Armv7?

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.

4. Why bytecode cannot be run in Android?

Android uses DVM (Dalvik Virtual Machine ) rather using JVM(Java Virtual Machine).

5. What is a BuildType in Gradle? And what can you use it for?

Build types define properties that Gradle uses when building and packaging your Android app.

  1. A build type defines how a module is built, for example whether ProGuard is run.
  2. A product flavour defines what is built, such as which resources are included in the build.
  3. Gradle creates a build variant for every possible combination of your project’s product flavours and build types.

6. Explain the build process in Android:

  1. First step involves compiling the resources folder (/res) using the aapt (android asset packaging tool) tool. These are compiled to a single class file called R.java. This is a class that just contains constants.
  2. Second step involves the java source code being compiled to .class files by javac, and then the class files are converted to Dalvik bytecode by the “dx” tool, which is included in the sdk ‘tools’. The output is classes.dex.
  3. The final step involves the android apkbuilder which takes all the input and builds the apk (android packaging key) file.

7. What is the Android Application Architecture?

Android application architecture has the following components:

  1. Services − It will perform background functionalities
  2. Intent − It will perform the inter connection between activities and the data passing mechanism
  3. Resource Externalization − strings and graphics
  4. Notification − light, sound, icon, notification, dialog box and toast
  5. Content Providers − It will share the data between applications

8. Describe activities

Activities are basically containers or windows to the user interface.

9. What Is the Google Android SDK?

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.

10. What is AAPT?

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.

11. What is the use of an activityCreator?

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.

12. What are Intents?

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.

13. What is the importance of XML-based layouts?

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.

14. What are containers?

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.

15. What is Orientation?

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.

16. Define and explain Android Framework.

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.

17. What is meant by Services?

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

{
}

18. Explain Implicit and Explicit Intents.

Implicit Intent calls the system components while explicit Intents invoke the Activity class.

19. What is the importance of setting up permission in app development?

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.

20. What is ANR in Android?

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.

21. What is AIDL?

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.

22. Which tools are used for debugging on 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.

23. Which scenario can test only on real devices but not on emulator?

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.

24. Name the mobile automation tools that are available in the market.

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.

25. What is the significance of the .dex files?

  • Android programs are compiled into ‘.dex’ (Dalvik Executable) files, which are zipped into a single .apk file on the device.
  • ‘.dex’ files can be created by translating compiled applications written in Java.
  • (.dex) is a format that is optimized for effective storage and memory-mappable executions.

26. How are escape characters used as attribute?

Escape characters are preceded by double backslashes. For example – a newline character is created using ‘n’.

27. How can ANR be prevented?

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.

28. What is singleton class in android?

A class which can create only an object, that object can be share able to all other classes.

29. What is fragment in android?

Fragment is a piece of activity, if you want to do turn your application 360 degrees, you can do this by fragment.

30.What is sleep mode in android?

Sleep mode mean CPU will be sleeping and it doesn't accept any commands from android device except Radio interface layer and alarm.

Career scopes and salary scale

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.

Conclusion

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 NoidaAndroid Training in DelhiAndroid Training in Gurgaon



Enquire Now






Thank you

Yeah! Your Enquiry Submitted Successfully. One Of our team member will get back to your shortly.

Enquire Now Enquire Now