Interview questions for AOSP
1) What is OOPS?
OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.
2) Write basic concepts of OOPS?
Following are the concepts of OOPS:
3. What file futures used in Android?
Android is rich in file features and it provides lots of variations in them as well. The file features are as follows:
Intent filters: includes bundle of information which describes a desired action.
Icons and Labels: includes information for small icon and a text label that can be displayed to users. These are set for an intent filter and are used to represent a component which fulfills the function advertised by the filter.
Permissions: it is a restriction or limitation access to a part of code or data on the device. It is given as:-android.permission.CALL_EMERGENCY_NUMBERS
Libraries: it includes the basic packages for building and developing applications.
4. What is a class?
A class is simply a representation of a type of object. It is the blueprint/plan/template that describes the details of an object.
How does AOSP relate to te Android Compatibility programme?
AOSP stands for Android Open-source project that maintains Android software and keep track of the new versions. It can be used for any purpose including the devices that are not compatible with other devices. It is related to the Android Compatibility Program as it defines the implementation of Android that is compatible with the third party apps.
5) What is Encapsulation?
Encapsulation is an attribute of an object, and it contains all data which is hidden. That hidden data can be restricted to the members of that class.
Levels are Public, Protected, Private, Internal, and Protected Internal.
6) Described the different storage methods in Android?
Android provides many options for storage of persistent data. It provides the solution according to your need. The storages which have been provided in Android are as follows:-
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.
Network Connection: Store data on the web with your own network server.
7) What is Polymorphism?
Polymorphism is nothing but assigning behavior or value in a subclass to something that was already declared in the main class. Simply, polymorphism takes more than one form.
Explain how Localization and how to achieve
Localization is a way of representing the products in different languages. Android is an operating system which runs in many regions, so to reach different users localization is a must. Localization in Android can be achieved by incorporating different languages in the application which you are using. To do this knowledge of Java, XML elements, Activity lifecycle and general principles of internationalization and localization are required.
8) What is Inheritance?
Inheritance is a concept where one class shares the structure and behavior defined in another class. If Inheritance applied to one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance.
Explain in brief about the important file and folder when you create new android application.
When you create android application the following folders are created in the package explorer in eclipse which are as follows:
src: Contains the .java source files for your project. You write the code for your application in this file. This file is available under the package name for your project.
gen: This folder contains the R.java file. It is compiler-generated file that references all the resources found in your project. You should not modify this file.
Android 4.0 library: This folder contains android.jar file, which contains all the class libraries needed for an Android application.
assets: This folder contains all the information about HTML file, text files, databases, etc.
bin: It contains the .apk file (Android Package) that is generated by the ADT during the build process. An .apk file is the application binary file. It contains everything needed to run an Android application.
res: This folder contains all the resource file that is used by android application. It contains subfolders as: drawable, menu, layout, and values etc.
9) What are manipulators?
Manipulators are the functions which can be used in conjunction with the insertion (<<) and extraction (>>) operators on an object. Examples are endl and setw.
10) Explain the term constructor?
A constructor is a method used to initialize the state of an object, and it gets invoked at the time of object creation. Rules for constructor are:
• Constructor Name should be the same as a class name.
• A constructor must have no return type
11. Describe Intents in detail?
An Android application can contain zero or more activities. If you want to navigate fromone activity to another then android provides you Intent class. This class is available inandroid.content.Intent package.One of the most common uses for Intents is to start new activities.
There are two types of Intents.
1) Explicit Intents
2) Implicit Intents
Intents works in pairs: actionand data. The action defines what you want to do, such as editing an item, viewingthe content of an item etc. The dataspecifies what is affected,such as a person in the Contacts database. The data is specified as anUri object.
12. What are different data storage options are available in Android?
Different data storage options are available in Android are:
– File Storage
– Cloud Storage
13. Describe SharedPreference storage option with example?
Shared Preference is the simplest mechanism to store the data in android. You do not worry about creating the file or using files API.It stores the data in XML files. SharedPreference stores the data in key value pair.The SharedPreferences class allows you to save and retrieve key-value pairs of primitive data types. You can use SharedPreferences to save any primitive data: boolean, floats, int, longs, and strings.The data is stored in XML file in the directory data/data//shared-prefs folder.
leave your comment