Android is a Linux-based operating system designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Initially developed by Android Inc., which Google backed financially and later bought in. Android was unveiled in 2007 along with the founding of the Open Handset Alliance: a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices The first Android-powered phone was sold in October 2008. Android is open source and Google releases the code under the Apache License. This open source code and permissive licensing allows the software to be freely modified and distributed by device manufacturers, wireless carriers and enthusiast developers. Additionally, Android has a large community of developers writing applications (“apps”) that extend the functionality of devices, written primarily in a customized version of the Java programming language These factors have allowed Android to become the world’s most widely used smartphone platform.
Given below are some interview questions that are often asked in Android.
It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.
Android application architecture has the following components. They are as follows :
Activity performs actions on the screen. If you want to do any operations, we can do with activity.
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.
Android Architecture is made up of 4 key components:
An Intent is exactly what it describes. It’s an “intention” to do an action.
An Intent is basically a message to say you did or want something to happen. Depending on the intent, apps or the OS might be listening for it and will react accordingly.
There are two types of intents in android:
Android Explicit intent specifies the component to be invoked from activity. In other words, we can call another activity in android by explicit intent.
Implicit Intent doesn’t specify the component. In such case, intent provides information of available components provided by the system that is to be invoked.
Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app’s code.
SDK stands for Software Development Kit.
AVD stands for Android Virtual Device (emulator). The Android SDK is a mobile device emulator- a virtual mobile device that runs on your computer.
Activities can be closed or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities executed.
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.
Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.
Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.
The container holds objects, widgets, labels, fields, icons, buttons. etc.
Shared preferences are the simplest mechanism to store the data in XML documents.
Using with intent, we can launch an activity.
Intent intent= new Intent(this, SecondActivity. class);
Shared Preferences, Internal Storage, External Storage, SQLite Databases and Network Connection.
A Sticky Intent is a broadcast from send Sticky Broadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.
A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.
The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.