Android Interview Questions and Answers
Question & Answers
Android Interview Questions & Answers
Android interview questions answers help job seekers and freshers to have basic and advance knowledge of Android framework. Experienced also can take the advantage of Android interview questions answers post.
What is Android?
Android is an open source and Linux-based Operating System Android was developed by the Open Handset Alliance, led by Google, and other companies.
What is Activity?
An android activity is like a single screen with a user interface. In other words when a user perform some task on UI( User Interface) like displaying list of email, displaying list of contacts, sending email or SMS, all these task are examples of Activities. Extend(Implement) the parent Actvity class to create a custom activity class.
What is APK format?
All files of android application like classes, assets are compressed and converted into single file. This compressed file is called APK (android packaging key) file.
ADT stands for?
Android Development Tool.
List the Core Components in Android.
- Content Provider
- Fragment etc.
List the Activity life cycle
- onCreate: On creation of first activity this callback method is called.
- onStart: When the activity starts appearing on UI interface that time onStart() method is called.
- onResume: If activity is in background and user starts interacting with the application then this method is called.
- onPause: If user is on one activity and switch to another activity then previous actvity goes in pause mode.
- onStop: When current activity is not visible to user then his method is called.
- onRestart: If user action stops the current activity before it starts then this method is called.
- onDestroy: Before the activity is destroyed this method is called.
What is AndroidManifest.xm?
AndroidManifest.xml is the vital part of android application. In other words it is necessary for android application to have a AndroidManifest.xml which must reside in root directory. It contains information about all resources like package, components, activities, services etc. Android application behaves according to informations in AndroidManifest.xml file.
An intent is a kind of filter which can be used to launch an activity, invoke a service, display a web page, sending SMS etc. intent filters are registered generally in AndroidManifest.xml or you can register intent filter in program.
Android supports two types of intents:
- Implicit Intent
- Explicit Intent
Define Toast Class in Android
The android.widget.Toast class is the subclass of java.lang.Object class. Android Toast class allows you to create a temporary message displayed on screen for very short duration. In other words message appears on screen and disappears after short period i.e very quickly.
Define View Group in Android
View Group is a like a container which can accommodate other other child views. It is an invisible part and the base class for layouts.