A Guide to Mobile and Web Technology(LAMP)

What is Android?
Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Explain the Architecture of android ?
Top -> Applications (Contacts, Browser, Phone, etc)

Below Applications -> Application Framework(Activity Manager, Window Manager, Content Providers, View System, Package manager,
Telephony manager, Resource, Notification, Location managers)

Below Application Framework -> System Libraries(Like Sqlite, webkit, SSL, OpenGL, Media Framework etc) & Android Runtime( Core Libraries and DVM)

Atlast Last -> Linux Kernel (which composed of drivers like display, camera etc.)

Describe the APK format.
The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files.
A project is compiled into a single .apk file.

What is an action?
A description of something that an Intent sender desires.

What is an activity?
A single screen in an application, with supporting Java code.
An activity presents a visual user interface for one focused endeavor the user can undertake.
For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions.
Each one is implemented as a subclass of the Activity base class.

What is a service?
A service doesn’t have a visual user interface, but rather runs in the background for an indefinite period of time.
For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate
something and provide the result to activities that need it.
Each service extends the Service base class.

What is a Broadcast receivers?
A broadcast receiver is a component that does nothing but receive and react to broadcast announcements.
For example, announcements that the timezone has changed, that the battery is low or that the user changed a language preference.
All receivers extend the BroadcastReceiver base class.
Broadcast receivers do not display a user interface. However, they may start an activity in response to the information they receive,
or they may use the NotificationManager to alert the user like(flashing the backlight, vibrating the device, playing a sound)

What is a content provider?
A content provider makes a specific set of the application’s data available to other applications.The content provider extends the ContentProvider
base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls.
However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead.

What is intent?
A class (Intent) describes what a caller desires to do. The caller sends this intent to Android’s intent resolver, which finds the most suitable activity for the intent.

How is nine-patch image different from a regular bitmap?
It is a resizable bitmap resource that can be used for backgrounds or other images on the device. The NinePatch class permits drawing a bitmap in nine sections. The four corners are unscaled; the four edges are scaled in one axis, and the middle is scaled in both axes.

What languages does Android support for application development?
Android applications are written using the Java programming language.

What is a resource?
A user-supplied XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.

What Virtual Machine Android runs on?
Dalvik virtual machine

Android Latest Version?
Android 3.0

How do you define the user interface?
XML Format is the best.

Code Snippets:
————————
How to start a browser instance with some url ?

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri u = Uri.parse("http://google.com");
intent.setData(u);
startActivity(intent);

//Function called when return from a sub activity.

protected void onActivityResult(int requestCode, int resultCode, String data, Bundle extras) {
}

//How to retrieve the device IMEI Number

TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
imei = mTelephonyMgr.getDeviceId(); 

How to call a subactivity?

Intent intent = new Intent(this, SubActivity.class);
//to pass data
addintent.putExtra(name, value);
startActivityForResult(intent, int);

Comments on: "Android Interview Questions and Answers (Basic)" (22)

  1. check these list of questions hope would be helpful:
    Android Interview Questions and Answers

  2. hi akaas & navas,

    Thanx for the FAQS.Its very useful.nice work guys….keep it up..

    regards,
    suriya

  3. Thanx for the questions and answers .. gud work

  4. […] Answers – Frequently Asked Questions – Complete Downloadable List – Day 0 of 31Android Interview Questions and Answers (Basic) window.google_analytics_uacct = […]

  5. Thanks for the questions and answers. Good one…

  6. Android Interview Questions and Answers (Basic)…

    Thank you for submitting this cool story – Trackback from JavaPins…

  7. well thanks for the list of questions but as a fresher do i need to learn from theses or from the android site its confusing to me .help me

    • You can refer this to get an idea about the basic things in android. But if you want to learn from the beginning(base) get started from the android site. It has more details from the groundup to expert level.

  8. android its help all.questions for interview ..and thank u keeping this …………..and keep much more questions about this…….

  9. Good questions!!!

    I have also added some 2000 odd Core Java and J2EE questions in

    Java Interview Questions

    Have a look at them and reply.

  10. I do not even know how I ended up here, but I thought this post was good.
    I don’t know who you are but definitely you are going to a famous blogger if you aren’t already 😉 Cheers!

  11. Thanx…
    It’s nice.

  12. I really like your blog.. very nice colors & theme.
    Did you create this website yourself or did you hire someone
    to do it for you? Plz reply as I’m looking to design my own blog and would like to know where u got this from. thanks a lot

  13. I really like reading through an article that will make people think.
    Also, thanks for allowing for me to comment!

  14. spandana said:

    i need android technical test questions

  15. All the questions seems to be important and useful. If you include some sample programs for starters that will be more good. Right now I am reading the theory part from android developers but the language they have written there kind of complicated. Android interview questions that you have covered is also very helful. I am also going through http://skillgun.com/android/interview-questions-and-answers that is also good.

Leave a reply to Duane Cancel reply