Tuesday 10 December 2013

Android Interview Question

Android Interview question for Advance level

1.What are the Different Kinds of Context?

Ans:
      Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.


2.When does ANR occur?

Ans:
      
 application responsiveness is monitored by the Activity Manager and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:
·         No response to an input event (such as key press or screen touch events) within 5 seconds.
·         BroadcastReceiver hasn't finished executing within 10 seconds.

3. How to Avoid ANR


Android applications normally run entirely on a single thread by default the "UI thread" or "main thread"). This means anything your application is doing in the UI thread that takes a long time to complete can trigger the ANR dialog because your application is not giving itself a chance to handle the input event or intent broadcasts.

The most effecive way to create a worker thread for longer operations is with the AsyncTask class. Simply extend AsyncTask and implement the doInBackground() method to perform the work. To post progress changes to the user, you can call publishProgress(), which invokes the onProgressUpdate() callback method. From your implementation of onProgressUpdate() (which runs on the UI thread), you can notify the user.



4. What is the TTL (Time to Live)? Why is it required?

Ans:
Time to live is what dictates how long it will be until your computer refreshes its DNS related information. For example, the IP address your domain name points to or where your MX records are directing email.

5. Is android supports Multitouch ?

Ans:
       yes
Some Core Gesture Set that support by Android.
  1. Touch
  2. Long Press 
  3. Swipe
  4. Drag
  5. Double Touch
  6. Pinch open
  7. pinch close

6. What are  Component of Android application?

 
Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, calledintents. Intent messaging is a facility for late run-time binding between components in the same or different applications. The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed — or, often in the case of broadcasts, a description of something that has happened and is being announced

 7. What is Intent Objects?

An Intent object is a bundle of information. It contains information of interest to the component that receives the intent (such as the action to be taken and the data to act on) plus information of interest to the Android system (such as the category of component that should handle the intent and instructions on how to launch a target activity). Principally,

 8. What does ADT stand for?

Ans :
       Android Development Tool.
     
 

9. Android Log.v(), Log.d(), Log.i(), Log.w(), Log.e(), Log.h(), Log.wtf() - When to use each one?


Ans:
we use the Log.v() Log.d() Log.i() Log.w() and Log.e() methods.

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

10.  What is AAPT? 

AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.

Keep Reading continue

No comments:

Today's Pageviews