Friday 30 October 2015

Android Interview Questions and Answers

Android is the most popular mobile OS in the world. Android Interview questions along with answers for which are commonly asked for fresher’s and experience in an interview. These android interview question with each answer explained in detail with example.
1. What is Android?
Android is open source mobile OS based on Linux and it is specifically developed for smart phones, tablets and Android TV etc.. Android was co-founded by Andy Rubin in 2003 and later acquired by Google during 2005.
2. Explain about the History of android and it different version?
Since the inception of Android mobile OS, 12 Android version are released starting with Alpha and Beta versions. Below is the list of Android version History.
Alpha(1.0), Beta(1.1), Cupcake(1.5), Donut(1.6), Éclair(2.0-2.1), Froyo(2.2), Gingerbread(2.3), Honeycomb(3.0-3.2), Ice Cream Sandwich(4.0), Jelly Bean(4.1-4.3), Kitkat(4.4) and the latest version is Lollipop(5.0).
3. What is activities?
Activity is an application component which has screen and user interface that is used to interacting and do certain action is called as. Examples for activities are: reading emails, taking photo, calculator.
4. What are SDK used for Android Development?
Eclipse(for Android) is one of the most used SDK for Android apps development. Android Studio first stable Version 1.0 which was recently launched by Google is an awesome SDK for app development. The other SDK used are: Corona, Xamarin, PhoneGap etc.
5. Explain about Android Studio?
Android Studio is IDE for Android Application Development. It is develop by Google along with the help of IntelliJ IDEA by JetBrains. It has many functionality such as Rich editor layout, ProGuard and other features. The first stable Version 1.0.1 was released on 8th December 2014.
6. Explain about Dalvik?
Dalvik is not only the virtual machine for Android OS but also provide runtime and bytecode which helps to process and executes apps for Android OS.
7. What are the main difference between Dalvik and ART?
Dalvik is replaced by Android Runtime by Google for latest versions. Dalvik used Just in Time(JIT) whereas ART uses Ahead-of Time(AOT).
8. What is content provider?
Content provider are used for sharing data from one app to other apps because by default app cannot access other application data due to permission issue. The data can be shared or used in different ways such as database, memory card etc. Thus, it support CRUD operation which means Create, Read, Update and Delete operations.
9. Explain briefly about Activity lifecycle?
There are different stages in Activity lifecycle. They are:
  • onCreate(): Used when activity is first created.
  • onStart(): When the activity is used
  • onRestart(): It will restart the activity
  • onResume(): The activity will be resume after being paused.
  • onPause(): The activity will be paused.
  • onStop(): The activity will be stopped.
  • onDestroy(): The activity will be destroyed.
10. Explain briefly about Android Manifest file?
AndroidManifest.xml file contains information about the package, components of application like activities, content provider, services etc. The file name should be exactly the same(i.e. AndroidManifest.xml) otherwise android application could not be executed or run.
11. Define intent?
Intent allows Android applications for communicating or sending messages within the app component or with other apps component for performing certain actions or tasks. The messages in component are passed between Activities, Services and Content Providers.
12. What is fragment?
A fragment represent a behavior or portion of UI within an Activity. Like Activity, Fragment does have Lifecycle. Multi-pane UI can be created in an Activity by embedding Multi Fragments.
13. What is layout and what are the different types of layout?
Layout defines the user interface of an activity. A Layout can be declared in two different ways: using XML and by Instantiate layout at runtime(using Java).
There are six different types of layout: They are:
  1. Linear Layout
  2. Relative Layout
  3. Grid Layout
  4. Table Layout
  5. Tab Layout
  6. List View
14. Explain Linear Layout?
In Linear Layout, all the elements are organize either vertically or horizontally. When the length of the screen exceeds the window, it creates a scroll bar.
15. What is Relative Layout?
In relative layout, relative elements can be placed above or below or left or right or even center. For example, we can place text field can be placed left and a button can be placed right.
16. What is action bar in android?
In Android, Action Bar is used for users location, search box and a drop-down list or tabs for switching within the app.
17. Does Visual Studio supports Android development? If yes, How?
No, Visual Studio does not support Android app development. Though we can use third party plugin like Xamarin to develop android apps. Xamarin also help to use the same code for all the major mobile OS i.e. Android, iOS and Windows Phones

No comments:

Post a Comment